Browse Source

webpack配置

张松 5 năm trước cách đây
mục cha
commit
fea8ced6b0
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      build/utils.js

+ 6 - 1
build/utils.js

@@ -28,7 +28,12 @@ exports.cssLoaders = function (options) {
     // Extract CSS when that option is specified
     // (which is the case during production build)
     if (options.extract) {
-      return ExtractTextPlugin.extract('vue-style-loader', sourceLoader)
+      return ExtractTextPlugin.extract({
+        use: sourceLoader,
+        fallback: 'vue-style-loader',
+        publicPath:'../../'
+      })
+      // return ExtractTextPlugin.extract('vue-style-loader', sourceLoader)
     } else {
       return ['vue-style-loader', sourceLoader].join('!')
     }