mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-08 18:57:39 +02:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72401291f8 | ||
|
|
7b34314b9e |
@@ -1,41 +0,0 @@
|
|||||||
import { defineConfig } from "vite";
|
|
||||||
import react from "@vitejs/plugin-react";
|
|
||||||
import path from "path";
|
|
||||||
import rollupNodePolyFill from "rollup-plugin-node-polyfills";
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
plugins: [react()],
|
|
||||||
define: {
|
|
||||||
"process.env.NODE_ENV": JSON.stringify("production"),
|
|
||||||
process: JSON.stringify({
|
|
||||||
env: {
|
|
||||||
NODE_ENV: "production"
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
build: {
|
|
||||||
lib: {
|
|
||||||
entry: path.resolve(__dirname, "src/ee/script/PublicTemplate.jsx"),
|
|
||||||
name: "PublicTemplate",
|
|
||||||
fileName: () => `public-template.bundle.js`,
|
|
||||||
formats: ["iife"]
|
|
||||||
},
|
|
||||||
outDir: "public/static/js",
|
|
||||||
emptyOutDir: false,
|
|
||||||
assetsInlineLimit: 0,
|
|
||||||
copyPublicDir: false,
|
|
||||||
rollupOptions: {
|
|
||||||
plugins: [rollupNodePolyFill()],
|
|
||||||
output: {
|
|
||||||
// 👇 Controls how asset files (like CSS) are named
|
|
||||||
assetFileNames: (assetInfo) => {
|
|
||||||
if (assetInfo.name && assetInfo.name.endsWith(".css")) {
|
|
||||||
return "public-template.bundle.css"; // Custom CSS filename
|
|
||||||
}
|
|
||||||
return "[name].[ext]";
|
|
||||||
},
|
|
||||||
globals: {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Reference in New Issue
Block a user