'use strict' const path = require('path'); // 首页模板 const indexTemplate = "src/index.html"; //修改U-config.js 增加版本 const fsC = require('./fs.js'); fsC.fs(); module.exports = { //测试环境配置 dev: { //页面引入静态资源前缀 BASE_URL: 'src/U/', //首页名称 filename:"index.html", //首页模板 indexTemplate:indexTemplate, //资源文件夹 assetsSubDirectory: '', //动态js,css引入目录 assetsPublicPath: '', //本地代理 proxyTable: { '/buyerside-h5-api': { target: 'http://172.16.90.64:8755', changeOrigin: true, pathRewrite: { '^/buyerside-h5-api': '' } } }, disableHostCheck: true, //配置测试地址 host: 'localhost', //测试端口 port: 9527, //自动打开浏览器 autoOpenBrowser: true, //错误提示 errorOverlay: true, notifyOnErrors: false, //轮询 poll: false, //使用Eslint Loader? //如果为true,则在捆绑期间将对您的代码进行处理 // linting错误和警告将显示在控制台中。 useEslint: true, //如果为true,则错误覆盖中也会显示eslint错误和警告 //在浏览器中 showEslintErrorsInOverlay: false, /** * Source Maps */ // https://webpack.js.org/configuration/devtool/#development devtool: '#cheap-source-map', //如果在devtools中调试vue文件时遇到问题, //将此设置为false - 它可以*帮助 // https://vue-loader.vuejs.org/en/options.html#cachebusting cacheBusting: true, // CSS Sourcemaps默认关闭,因为相对路径是“buggy” //使用此选项,根据CSS-Loader自述文件 //(https://github.com/webpack/css-loader#sourcemaps) //根据我们的经验,他们通常按预期工作, //启用此选项时,请注意此问题。 cssSourceMap: false, }, //生产打包配置 build: { //页面引入静态资源前缀 BASE_URL: 'buyer-side-h5/', //入口首页名称 index: path.resolve(__dirname, '../dist/index.html'), // index: 'index.html', //首页模板 indexTemplate:indexTemplate, //公共资源生成目录 assetsRoot: path.resolve(__dirname, '../dist'), // assetsRoot: path.resolve("z:\gylHtml"), //公共资源目录名称 assetsSubDirectory: 'buyer-side-h5', //动态js,css引入目录 assetsPublicPath: '', /** * Source Maps */ productionSourceMap: false, // https://webpack.js.org/configuration/devtool/#production devtool: '#source-map', // Gzip off by default as many popular static hosts such as // Surge or Netlify already gzip all static assets for you. // Before setting to `true`, make sure to: // npm install --save-dev compression-webpack-plugin productionGzip: false, productionGzipExtensions: ['js', 'css'], // Run the build command with an extra argument to // View the bundle analyzer report after build finishes: // `npm run build --report` // Set to `true` or `false` to always turn it on or off bundleAnalyzerReport: process.env.npm_config_report } }