refactor: switch to umd format
This commit is contained in:
parent
bf614ac222
commit
adc3278c7a
|
@ -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/\\.iife//' lib/*.js; cp -r assets/* lib/* ui/dist/* dist/",
|
"build:package": "mkdir -p dist; rename 's/\\.umd\\.cjs/.js/' lib/*.cjs; 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,7 +24,7 @@ export default defineConfig({
|
||||||
outDir: "lib",
|
outDir: "lib",
|
||||||
emptyOutDir: false,
|
emptyOutDir: false,
|
||||||
lib: {
|
lib: {
|
||||||
formats: ["iife"],
|
formats: ["umd"],
|
||||||
...currentConfig,
|
...currentConfig,
|
||||||
name: currentConfig.fileName,
|
name: currentConfig.fileName,
|
||||||
},
|
},
|
||||||
|
|
Reference in New Issue