/* * @Author: YLZH ylzh026611@163.com * @Date: 2022-11-15 10:41:18 * @LastEditors: YLZH ylzh026611@163.com * @LastEditTime: 2023-03-30 15:41:44 * @FilePath: \purchase\babel.config.js * @Description: * * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. */ const prodPlugins = []; if (process.env.NODE_ENV === "production") { prodPlugins.push("transform-remove-console"); } module.exports = { presets: [ // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app "@vue/cli-plugin-babel/preset" ], plugins: [...prodPlugins], 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. plugins: ["dynamic-import-node"] } } };