ci: switch to iife
This commit is contained in:
parent
8cf07259ea
commit
accdd9f130
|
@ -14,7 +14,7 @@
|
||||||
"build:backend:crypto": "LIB_NAME=crypto vite build",
|
"build:backend:crypto": "LIB_NAME=crypto vite build",
|
||||||
"build:backend:cryptoLoader": "LIB_NAME=cryptoLoader vite build",
|
"build:backend:cryptoLoader": "LIB_NAME=cryptoLoader vite build",
|
||||||
"build:ui": "cd ui && vite build",
|
"build:ui": "cd ui && vite build",
|
||||||
"build:package": "mkdir -p dist; rename 's/\\.cjs$/.js/' lib/*.cjs; cp -r assets/* lib/* dist/",
|
"build:package": "mkdir -p dist; rename 's/\\.iife//' lib/*.js; cp -r assets/* lib/* ui/dist/* dist/",
|
||||||
"clean:ui": "shx rm -r ui/dist || true",
|
"clean:ui": "shx rm -r ui/dist || true",
|
||||||
"clean:backend": "shx rm -r dist || true"
|
"clean:backend": "shx rm -r dist || true"
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,8 +24,9 @@ export default defineConfig({
|
||||||
outDir: "lib",
|
outDir: "lib",
|
||||||
emptyOutDir: false,
|
emptyOutDir: false,
|
||||||
lib: {
|
lib: {
|
||||||
formats: ["cjs"],
|
formats: ["iife"],
|
||||||
...currentConfig,
|
...currentConfig,
|
||||||
|
name: currentConfig.fileName,
|
||||||
},
|
},
|
||||||
minify: false,
|
minify: false,
|
||||||
rollupOptions: { output: { inlineDynamicImports: true } },
|
rollupOptions: { output: { inlineDynamicImports: true } },
|
||||||
|
|
Reference in New Issue