update to webpack4.0 (#136)
* dev * update * fix * refine * add ScriptExtHtmlWebpackPlugin * update * format * refine * typo * format * docs * docs
This commit is contained in:
		@@ -6,7 +6,6 @@ const path = require('path')
 | 
			
		||||
 | 
			
		||||
module.exports = {
 | 
			
		||||
  dev: {
 | 
			
		||||
 | 
			
		||||
    // Paths
 | 
			
		||||
    assetsSubDirectory: 'static',
 | 
			
		||||
    assetsPublicPath: '/',
 | 
			
		||||
@@ -35,17 +34,12 @@ module.exports = {
 | 
			
		||||
    // https://webpack.js.org/configuration/devtool/#development
 | 
			
		||||
    devtool: 'cheap-source-map',
 | 
			
		||||
 | 
			
		||||
    // If you have problems debugging vue-files in devtools,
 | 
			
		||||
    // set this to false - it *may* help
 | 
			
		||||
    // https://vue-loader.vuejs.org/en/options.html#cachebusting
 | 
			
		||||
    cacheBusting: true,
 | 
			
		||||
 | 
			
		||||
    // CSS Sourcemaps off by default because relative paths are "buggy"
 | 
			
		||||
    // with this option, according to the CSS-Loader README
 | 
			
		||||
    // (https://github.com/webpack/css-loader#sourcemaps)
 | 
			
		||||
    // In our experience, they generally work as expected,
 | 
			
		||||
    // just be aware of this issue when enabling this option.
 | 
			
		||||
    cssSourceMap: false,
 | 
			
		||||
    cssSourceMap: false
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  build: {
 | 
			
		||||
@@ -71,7 +65,7 @@ module.exports = {
 | 
			
		||||
 | 
			
		||||
    productionSourceMap: false,
 | 
			
		||||
    // https://webpack.js.org/configuration/devtool/#production
 | 
			
		||||
    devtool: '#source-map',
 | 
			
		||||
    devtool: 'source-map',
 | 
			
		||||
 | 
			
		||||
    // Gzip off by default as many popular static hosts such as
 | 
			
		||||
    // Surge or Netlify already gzip all static assets for you.
 | 
			
		||||
@@ -84,6 +78,9 @@ module.exports = {
 | 
			
		||||
    // 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
 | 
			
		||||
    bundleAnalyzerReport: process.env.npm_config_report || false,
 | 
			
		||||
 | 
			
		||||
    // `npm run build:prod --generate_report`
 | 
			
		||||
    generateAnalyzerReport: process.env.npm_config_generate_report || false
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user