diff --git a/babel.config.js b/babel.config.js index 81c5e5c..a9f520f 100644 --- a/babel.config.js +++ b/babel.config.js @@ -18,16 +18,6 @@ if (IS_PROD) { } module.exports = { - presets: ['@vue/cli-plugin-babel/preset'], - plugins: [ - [ - 'import', - { - libraryName: 'vant', - libraryDirectory: 'es', - style: true - }, - 'vant' - ] - ] + presets: [['@vue/cli-plugin-babel/preset', { useBuiltIns: 'usage', corejs: 3 }]], + plugins }; diff --git a/vue.config.js b/vue.config.js index 98cc3cf..d1ec85c 100644 --- a/vue.config.js +++ b/vue.config.js @@ -44,6 +44,7 @@ module.exports = defineConfig({ assetsDir: 'static', // outputDir的静态资源(js、css、img、fonts)目录 lintOnSave: !IS_PROD, productionSourceMap: false, // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。 + transpileDependencies: false, devServer: { port: 9093, // 端口 open: false, // 启动后打开浏览器