remove resolve-url-loader

Depending on sourcemaps makes many inconsistencies for builds! Same behaviour is supported by vue-loader
This commit is contained in:
Pooya Parsa 2017-08-20 13:33:23 +04:30
parent 086a642332
commit 8d489349c0
2 changed files with 1 additions and 9 deletions

View File

@ -8,7 +8,7 @@ export default function styleLoader (ext, loaders = [], isVueLoader = false) {
return { return {
loader, loader,
options: { options: {
sourceMap: true // Source map is REQUIRED for urlLoader sourceMap: this.options.build.cssSourceMap
} }
} }
} }
@ -52,18 +52,12 @@ export default function styleLoader (ext, loaders = [], isVueLoader = false) {
} }
} }
// https://github.com/bholloway/resolve-url-loader
const urlLoader = {
loader: 'resolve-url-loader'
}
if (this.options.build.extractCSS && !this.options.dev) { if (this.options.build.extractCSS && !this.options.dev) {
return ExtractTextPlugin.extract({ return ExtractTextPlugin.extract({
fallback: vueStyleLoader, fallback: vueStyleLoader,
use: [ use: [
cssLoader, cssLoader,
postcssLoader, postcssLoader,
urlLoader,
...loaders ...loaders
].filter(l => l) ].filter(l => l)
}) })
@ -73,7 +67,6 @@ export default function styleLoader (ext, loaders = [], isVueLoader = false) {
vueStyleLoader, vueStyleLoader,
cssLoader, cssLoader,
postcssLoader, postcssLoader,
urlLoader,
...loaders ...loaders
].filter(l => l) ].filter(l => l)
} }

View File

@ -105,7 +105,6 @@
"postcss-url": "^7.1.2", "postcss-url": "^7.1.2",
"pretty-error": "^2.1.1", "pretty-error": "^2.1.1",
"progress-bar-webpack-plugin": "^1.10.0", "progress-bar-webpack-plugin": "^1.10.0",
"resolve-url-loader": "^2.1.0",
"serialize-javascript": "^1.4.0", "serialize-javascript": "^1.4.0",
"serve-static": "^1.12.4", "serve-static": "^1.12.4",
"server-destroy": "^1.0.1", "server-destroy": "^1.0.1",