12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- const path = require('path');
- const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
- const isProduction = process.env.NODE_ENV === 'production';
- module.exports = {
- chainWebpack: (config) => {
-
- config.plugins.delete('prefetch');
- },
- assetsDir: 'assets',
- productionSourceMap: !isProduction,
-
- lintOnSave: 'error',
-
- crossorigin: 'anonymous',
-
- integrity: true,
- publicPath: process.env.BASE_URL,
- indexPath: 'index.html',
-
- devServer: {
-
- open: true,
- disableHostCheck: true,
- proxy: {
- '/phpapi': {
- target: process.env.VUE_APP_PHP_URL,
- changeOrigin: true,
- pathRewrite: { '^/phpapi': '' },
-
-
-
-
- },
- },
- },
- configureWebpack: {
- resolve: {
- mainFields: ['browser', 'module', 'main'],
- alias: {
- '@': path.resolve(__dirname, 'src'),
- },
- },
- optimization: {
- minimizer: [
- new UglifyJsPlugin({
- uglifyOptions: {
- warnings: false,
- compress: {
- drop_console: true,
- drop_debugger: true,
- pure_funcs: ['console.log'],
- },
- output: {
- beautify: false,
- comments: false,
- },
- },
- sourceMap: false,
- parallel: true,
- }),
- ],
- },
- },
- };
|