From 666d4f6ad00b7cad1bd03c24b256ed77c56e3aa2 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 06 六月 2023 09:04:02 +0800
Subject: [PATCH] 1.生产入库实现70%
---
babel.config.js | 35 +++++++++++++++++++++++++----------
1 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/babel.config.js b/babel.config.js
index fb82b27..691ee39 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -1,14 +1,29 @@
+// module.exports = {
+// presets: [
+// // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
+// '@vue/cli-plugin-babel/preset'
+// ],
+// 'env': {
+// 'development': {
+// // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
+// // This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
+// // https://panjiachen.github.io/vue-element-admin-site/guide/advanced/lazy-loading.html
+// 'plugins': ['dynamic-import-node']
+// }
+// }
+// }
+
+const proPlugins = []
+// 濡傛灉鏄敓浜х幆澧冿紝鍒欎娇鐢ㄥ幓鎺塩onsole鐨勬彃浠�
+if (process.env.NODE_ENV === 'production') {
+ proPlugins.push('transform-remove-console', 'dynamic-import-node')
+}
+
module.exports = {
presets: [
- // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
- '@vue/cli-plugin-babel/preset'
+ '@vue/app'
],
- 'env': {
- 'development': {
- // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
- // This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
- // https://panjiachen.github.io/vue-element-admin-site/guide/advanced/lazy-loading.html
- 'plugins': ['dynamic-import-node']
- }
- }
+ plugins: [
+ ...proPlugins
+ ]
}
--
Gitblit v1.9.3