Fix compile of the github extension

All of our webpack scripts are modules now
This commit is contained in:
Matt Bierner
2025-08-13 10:09:04 -07:00
parent d3c3cf8f50
commit 0b4691fe56
2 changed files with 4 additions and 7 deletions

View File

@@ -63,11 +63,9 @@ function updateExtensionPackageJSON(input: Stream, update: (data: any) => any):
function fromLocal(extensionPath: string, forWeb: boolean, disableMangle: boolean): Stream {
const esm = JSON.parse(fs.readFileSync(path.join(extensionPath, 'package.json'), 'utf8')).type === 'module';
const webpackConfigFileName = forWeb
? `extension-browser.webpack.config.${!esm ? 'js' : 'cjs'}`
: `extension.webpack.config.${!esm ? 'js' : 'cjs'}`;
? `extension-browser.webpack.config.js`
: `extension.webpack.config.js`;
const isWebPacked = fs.existsSync(path.join(extensionPath, webpackConfigFileName));
let input = isWebPacked