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({
mode: isProduction ? "production" : "development",
build: {
target: "modules",
outDir: "../../built/_sw_dist_",
assetsDir: "",
target: ["chrome87", "firefox78", "safari14", "es2017"],
manifest: "manifest.json",
rollupOptions: {
input: "./src/sw.ts",
input: {
app: "./src/sw.ts",
},
output: {
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: {
alias: {