forked from github/dataease
commit
ed9f90c08e
@ -1,5 +1,6 @@
|
||||
import pkg from '../package.json'
|
||||
import viteCompression from 'vite-plugin-compression'
|
||||
|
||||
export default {
|
||||
plugins: [
|
||||
viteCompression({
|
||||
@ -12,6 +13,7 @@ export default {
|
||||
})
|
||||
],
|
||||
build: {
|
||||
cssCodeSplit: false,
|
||||
rollupOptions: {
|
||||
external: id => /de-xpack/.test(id) || /extensions/.test(id),
|
||||
output: {
|
||||
@ -19,10 +21,15 @@ export default {
|
||||
chunkFileNames: `assets/chunk/[name]-${pkg.version}-${pkg.name}.js`,
|
||||
assetFileNames: `assets/[ext]/[name]-${pkg.version}-${pkg.name}.[ext]`,
|
||||
entryFileNames: `js/[name]-${pkg.version}-${pkg.name}.js`,
|
||||
manualChunks(id: string) {
|
||||
if (id.includes('node_modules')) {
|
||||
return id.toString().split('node_modules/')[1].split('/')[0].toString()
|
||||
}
|
||||
manualChunks: {
|
||||
echarts: ['echarts'],
|
||||
vue: ['vue', 'vue-router', 'pinia', 'vue-i18n', 'mitt'],
|
||||
lodash: ['lodash-es', 'lodash'],
|
||||
library: ['jspdf', '@tinymce/tinymce-vue', 'screenfull'],
|
||||
antv: ['@antv/g2', '@antv/g2plot', '@antv/l7', '@antv/l7plot', '@antv/s2'],
|
||||
tinymce: ['tinymce'],
|
||||
axios: ['axios'],
|
||||
'vuedraggable-es': ['vuedraggable']
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -7,7 +7,7 @@
|
||||
"build:flush": "cd ./flushbonading && rimraf ./demo.html && npm i && node ./index.js",
|
||||
"ts:check": "vue-tsc --noEmit",
|
||||
"build:base": "NODE_OPTIONS=--max_old_space_size=4096 vite build --mode base && npm run build:flush",
|
||||
"build:distributed": "NODE_OPTIONS=--max_old_space_size=4096 vite build --mode distributed && npm run build:flush",
|
||||
"build:distributed": "NODE_OPTIONS=--max_old_space_size=5020 vite build --mode distributed && npm run build:flush",
|
||||
"build:lib": "vite build --mode lib",
|
||||
"lint": "eslint . --ext .vue,.js,.ts,.jsx,.tsx --fix",
|
||||
"lint:stylelint": "stylelint --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
|
||||
|
Loading…
Reference in New Issue
Block a user