123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- const TerserPlugin = require('terser-webpack-plugin')
- module.exports = {
- assetsDir: 'static',
- publicPath: './',
- devServer: {
- host: '192.168.2.97',
- port: 8080,
-
- proxy: {
- [process.env.VUE_APP_BASE_API]: {
- target: 'https://www.lvweicaoping.com',
- changeOrigin: true,
- pathRewrite: {
- ['^' + process.env.VUE_APP_BASE_API]: '',
- },
- ws: false,
- },
- },
- },
- transpileDependencies: true,
- lintOnSave: false,
-
-
-
-
- productionSourceMap: false,
-
- configureWebpack: (config) => {
- if (process.env.NODE_ENV === 'production') {
-
- config.plugins.push(
- new TerserPlugin({
- terserOptions: {
- ecma: undefined,
- warnings: false,
- parse: {},
- compress: {
- drop_console: true,
- drop_debugger: false,
- pure_funcs: ['console.log'],
- },
- },
- })
- )
- }
- },
- }
|