mirror of
https://github.com/FULU-Foundation/CRW-Extension.git
synced 2026-05-13 00:52:10 -04:00
32 lines
639 B
TypeScript
32 lines
639 B
TypeScript
import { defineConfig } from "vite";
|
|
import { resolve } from "path";
|
|
import { fileURLToPath } from "url";
|
|
import { getOutDir } from "./viteEnv";
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: { "@": fileURLToPath(new URL("./src", import.meta.url)) }
|
|
},
|
|
|
|
optimizeDeps: {
|
|
include: ["webextension-polyfill"]
|
|
},
|
|
|
|
build: {
|
|
outDir: getOutDir(),
|
|
emptyOutDir: false,
|
|
minify: false,
|
|
sourcemap: true,
|
|
|
|
rollupOptions: {
|
|
input: {
|
|
content: resolve(__dirname, "src/content/index.tsx")
|
|
},
|
|
output: {
|
|
format: "iife",
|
|
entryFileNames: "assets/[name].js"
|
|
}
|
|
}
|
|
}
|
|
});
|