Skip to content

Commit

Permalink
[fix] build: the publicPath of ExtractTextPlugin for modules should b…
Browse files Browse the repository at this point in the history
…e '../'
  • Loading branch information
AmyFoxFN committed May 19, 2018
1 parent f50195f commit f1a6f95
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ exports.cssLoaders = function (options) {
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader'
fallback: 'vue-style-loader',
publicPath: options.extract.publicPath
})
} else {
return ['vue-style-loader'].concat(loaders)
Expand Down
7 changes: 6 additions & 1 deletion build/webpack.modules.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ if (files) {
var webpackConfig = merge(baseWebpackConfig, {
entry: modules,
module: {
rules: utils.styleLoaders({ sourceMap: config.build.productionSourceMap, extract: true })
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: {
publicPath: '../'
}
})
},
devtool: config.build.productionSourceMap ? '#source-map' : false,
output: {
Expand Down

0 comments on commit f1a6f95

Please sign in to comment.