update to webpack4.0 (#136)

* dev

* update

* fix

* refine

* add ScriptExtHtmlWebpackPlugin

* update

* format

* refine

* typo

* format

* docs

* docs
This commit is contained in:
花裤衩
2018-08-16 11:08:53 +08:00
committed by GitHub
parent 4bc17952ed
commit 222f1c48f6
17 changed files with 330 additions and 263 deletions

View File

@@ -1,22 +1,5 @@
'use strict'
const utils = require('./utils')
const config = require('../config')
const isProduction = process.env.NODE_ENV === 'production'
const sourceMapEnabled = isProduction
? config.build.productionSourceMap
: config.dev.cssSourceMap
module.exports = {
loaders: utils.cssLoaders({
sourceMap: sourceMapEnabled,
extract: isProduction
}),
cssSourceMap: sourceMapEnabled,
cacheBusting: config.dev.cacheBusting,
transformToRequire: {
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: 'xlink:href'
}
//You can set the vue-loader configuration by yourself.
}