build: 🐛 sw firefish-js imports

This commit is contained in:
ThatOneCalculator 2023-10-08 18:40:48 -07:00
parent 5003969682
commit 5033d4e682
No known key found for this signature in database
GPG Key ID: 8703CACD01000000

View File

@ -8,15 +8,26 @@ import viteCompression from "vite-plugin-compression";
export default defineConfig({ export default defineConfig({
mode: isProduction ? "production" : "development", mode: isProduction ? "production" : "development",
build: { build: {
target: "modules", target: ["chrome87", "firefox78", "safari14", "es2017"],
outDir: "../../built/_sw_dist_", manifest: "manifest.json",
assetsDir: "",
rollupOptions: { rollupOptions: {
input: "./src/sw.ts", input: {
app: "./src/sw.ts",
},
output: { output: {
entryFileNames: "sw.js", entryFileNames: "sw.js",
}, },
}, },
cssCodeSplit: true,
assetsInlineLimit: 0,
outDir: `${__dirname}/../../built/_sw_dist_`,
assetsDir: ".",
emptyOutDir: false,
sourcemap: process.env.NODE_ENV === "development",
reportCompressedSize: false,
commonjsOptions: {
include: [/firefish-js/, /node_modules/],
},
}, },
resolve: { resolve: {
alias: { alias: {