From 0a08b13b0382dc5741f0e674e6598b82be0e16e7 Mon Sep 17 00:00:00 2001 From: chenJinxu <2183691628@qq.com> Date: Fri, 22 Dec 2023 19:08:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- babel.config.js | 14 ++------------ vue.config.js | 1 + 2 files changed, 3 insertions(+), 12 deletions(-) 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, // 启动后打开浏览器