fix: transpile dynamic imports to cjs (#1975)
This commit is contained in:
parent
28a2042b7f
commit
1e3e8ebe40
2 changed files with 10 additions and 5 deletions
|
|
@ -19,6 +19,7 @@ const esbuildConfig = {
|
|||
// https://github.com/evanw/esbuild/issues/1492#issuecomment-893144483
|
||||
inject: ["./scripts/importMetaUrl.js"],
|
||||
define: { "import.meta.url": "importMetaUrl" },
|
||||
supported: { "dynamic-import": false },
|
||||
};
|
||||
|
||||
(async () => {
|
||||
|
|
|
|||
|
|
@ -15,14 +15,18 @@ if (!fs.existsSync("build")) {
|
|||
const isPreRelease = args.includes("--pre-release");
|
||||
|
||||
let command = isPreRelease
|
||||
? "npx vsce package --out ./build patch --pre-release --no-dependencies" // --yarn"
|
||||
: "npx vsce package --out ./build patch --no-dependencies"; // --yarn";
|
||||
? "npx vsce package --out ./build patch --pre-release --no-dependencies" // --yarn"
|
||||
: "npx vsce package --out ./build patch --no-dependencies"; // --yarn";
|
||||
|
||||
if (target) command += ` --target ${target}`;
|
||||
if (target) {
|
||||
command += ` --target ${target}`;
|
||||
}
|
||||
|
||||
exec(command, (error) => {
|
||||
if (error) throw error;
|
||||
if (error) {
|
||||
throw error;
|
||||
}
|
||||
console.log(
|
||||
"vsce package completed - extension created at extensions/vscode/build/continue-patch.vsix",
|
||||
"vsce package completed - extension created at extensions/vscode/build/continue-{version}.vsix",
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue