Closed LockingReal closed 1 year ago
import { defineConfig } from 'vite'; import path from 'path'; import commonjs from '@rollup/plugin-commonjs'; import vue from '@vitejs/plugin-vue'; import vueJsx from '@vitejs/plugin-vue-jsx';
export default defineConfig({ base:'./', alias: { '/@': path.resolve(__dirname, '.', 'src') }, plugins:[ vue(), vueJsx() ], server:{ port:3000, hmr:{ overlay:true }, open:false }, build:{ target: 'modules', polyfillDynamicImport: true, outDir: 'dist', assetsDir: 'assets', assetsInlineLimit: 4096, cssCodeSplit: true, sourcemap: false, manifest: false, }, // transpileDependencies: ["vuex-persist"] wrong there optimizeDeps: { include: ['lodash', 'echarts', '@ant-design/colors'] } })
Did it work for you?
import { defineConfig } from 'vite'; import path from 'path'; import commonjs from '@rollup/plugin-commonjs'; import vue from '@vitejs/plugin-vue'; import vueJsx from '@vitejs/plugin-vue-jsx';
export default defineConfig({ base:'./', alias: { '/@': path.resolve(__dirname, '.', 'src') }, plugins:[ vue(), vueJsx() ], server:{ port:3000, hmr:{ overlay:true }, open:false }, build:{ target: 'modules', polyfillDynamicImport: true, outDir: 'dist', assetsDir: 'assets', assetsInlineLimit: 4096, cssCodeSplit: true, sourcemap: false, manifest: false, }, // transpileDependencies: ["vuex-persist"] wrong there optimizeDeps: { include: ['lodash', 'echarts', '@ant-design/colors'] } })