Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
Joabesv committed Feb 13, 2024
1 parent f32859d commit d60d4fe
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
23 changes: 20 additions & 3 deletions tasks/mvsw.dev.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,33 @@ import { logger } from "./utils.mjs";
await cp(resolve("src/pages"), resolve("extension/dev/pages"), {
recursive: true,
});
await cp(resolve("src/lib"), resolve("extension/dev/lib"), {
recursive: true,
});
await rename(
resolve("extension/dev/dist/lib/init.global.js"),
resolve("extension/dev/lib/init.js")
);
await rename(
resolve("extension/dev/dist/lib/xdLocalStorage.min.global.js"),
resolve("extension/dev/lib/xdLocalStorage.min.js")
);
await rename(
resolve(
"extension/dev/dist/lib/xdLocalStoragePostMessageApi.min.global.js"
),
resolve("extension/dev/lib/xdLocalStoragePostMessageApi.min.js")
);
await rename(
resolve("extension/dev/dist/background.global.js"),
resolve("extension/dev/dist/scripts/background.global.js"),
resolve("extension/dev/background.js")
);
await rename(
resolve("extension/dev/dist/contentscript.global.js"),
resolve("extension/dev/dist/scripts/contentscript.global.js"),
resolve("extension/dev/contentscript.js")
);
await rename(
resolve("extension/dev/dist/contentScriptPortal.global.js"),
resolve("extension/dev/dist/scripts/contentScriptPortal.global.js"),
resolve("extension/dev/contentScriptPortal.js")
);
await rm(resolve("extension/dev/dist"), { recursive: true });
Expand Down
3 changes: 3 additions & 0 deletions tasks/mvsw.prod.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import { logger } from "./utils.mjs";
await cp(resolve("src/pages"), resolve("extension/prod/pages"), {
recursive: true,
});
await cp(resolve("src/lib"), resolve("extension/prod/lib"), {
recursive: true,
});
await rename(
resolve("extension/prod/dist/background.global.js"),
resolve("extension/prod/background.js")
Expand Down
1 change: 1 addition & 0 deletions tsup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default defineConfig({
"src/scripts/background.js",
"src/scripts/contentscript.js",
"src/scripts/contentScriptPortal.js",
"src/lib/*.js",
],
target: "node20",
format: "iife",
Expand Down

0 comments on commit d60d4fe

Please sign in to comment.