123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- module.exports = {
- publicPath: '/sdMove/', //部署路径后缀
- //publicPath: process.env.NODE_ENV === "production" ? "/sdMove" : "/sdMove",
- // publicPath: '/', //部署路径后缀
- assetsDir: 'static', // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录。
- indexPath: 'index.html', // 指定生成的 index.html 的输出路径 (相对于 outputDir)。也可以是一个绝对路径。
- filenameHashing: true, // 文件名hash,默认
- lintOnSave: false, // 开发环境下通过 eslint-loader 在每次保存时 lint 代码
- productionSourceMap: false, // 关闭生产环境的 source map
- devServer: {
- overlay: {
- // 让浏览器 overlay 同时显示警告和错误
- warnings: true,
- errors: true
- },
- host: '0.0.0.0',
- port: 8080, // 端口号
- // https: false, // https:{type:Boolean}
- open: false, // 配置自动启动浏览器
- hotOnly: true, // 热更新
- proxy: {
- // 配置多个跨域
- '/': {
- //target: 'http://10.108.34.2:80/sdpart/sdp/', //向日葵
- target: 'http://172.16.120.104:8089/sdp/', //本地
- //target: 'http://101.133.214.75:81/sdpart/sdp/', // 线上 测试
- changeOrigin: false,
- pathRewrite: {
- '': '/'
- }
- }
- },
- headers: {
- 'Access-Control-Allow-Origin': '*',
- }
- },
- configureWebpack: {
- performance: {
- hints: 'warning',
- // 入口起点的最大体积
- maxEntrypointSize: 50000000,
- // 生成文件的最大体积
- maxAssetSize: 30000000,
- // 只给出 js 文件的性能提示
- assetFilter: function(assetFilename) {
- return assetFilename.endsWith('.js')
- }
- }
- },
- };
|