championswimmer / vuex-persist

A Vuex plugin to persist the store. (Fully Typescript enabled)
http://championswimmer.in/vuex-persist
MIT License
1.67k stars 116 forks source link

How can I work in vite2 vite.config.ts/js The introduction of vuex persist in #220

Closed LockingReal closed 1 year ago

LockingReal commented 3 years 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'] } })

championswimmer commented 1 year ago

Did it work for you?