|
@@ -10,24 +10,6 @@ import svgLoader from 'vite-svg-loader'
|
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
import DefineOptions from 'unplugin-vue-define-options/vite'
|
|
import DefineOptions from 'unplugin-vue-define-options/vite'
|
|
|
|
|
|
-function fixAntdvWarningPlugin() {
|
|
|
|
- return {
|
|
|
|
- name: 'fix-antd-vue-warning', //
|
|
|
|
- transform(code: string, id: string) {
|
|
|
|
- // replace antdv js only
|
|
|
|
- if (id.includes('ant-design-vue/es/_util/hooks/_vueuse')) {
|
|
|
|
- // replace /* #__PURE__ */ with empty string
|
|
|
|
- const newCode = code.replace(/\/\* #__PURE__ \*\//g, '')
|
|
|
|
-
|
|
|
|
- return {
|
|
|
|
- code: newCode,
|
|
|
|
- map: null,
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
// https://vitejs.dev/config/
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig(({ mode }) => {
|
|
export default defineConfig(({ mode }) => {
|
|
// eslint-disable-next-line n/prefer-global/process
|
|
// eslint-disable-next-line n/prefer-global/process
|
|
@@ -51,8 +33,6 @@ export default defineConfig(({ mode }) => {
|
|
],
|
|
],
|
|
},
|
|
},
|
|
plugins: [
|
|
plugins: [
|
|
- fixAntdvWarningPlugin(),
|
|
|
|
-
|
|
|
|
vue({
|
|
vue({
|
|
script: {
|
|
script: {
|
|
defineModel: true,
|
|
defineModel: true,
|