1234567891011121314151617181920212223242526272829303132333435363738394041 |
- const {defineConfig} = require('@vue/cli-service')
- const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
- module.exports = defineConfig({
- transpileDependencies: [/node_modules/],
- lintOnSave: false,
- configureWebpack: {
- module: {
- // 解决require引入警告
- unknownContextCritical: false
- },
- plugins: [
- new NodePolyfillPlugin()
- ],
- optimization: {
- // 抽取公共模块执行压缩
- minimize: process.env.NODE_ENV === "production"
- },
- // sourcemap生成
- devtool: process.env.NODE_ENV === "production" ? false : "source-map"
- },
- devServer: {
- port: 8080,
- proxy: {
- '/proxy_dtbserver/': {
- target: 'http://122.228.28.40:10091/dtb',
- changeOrigin: true,
- pathRewrite: {
- '^/proxy_dtbserver': ''
- }
- },
- '/oauth/': {
- target: 'http://122.228.28.40:10096/oauth',
- changeOrigin: true,
- pathRewrite: {
- '^/oauth': ''
- }
- },
- }
- }
- })
|