Skip to content

Commit 2874afb

Browse files
committed
🐛 Fix minimal webpack release config
1 parent bebef1c commit 2874afb

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

build/webpack.release.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
var vue = require('vue-loader')
22
var path = require('path')
3+
var config = require('../config')
4+
var utils = require('./utils')
35
var webpack = require("webpack")
46
var ExtractTextPlugin = require("extract-text-webpack-plugin")
57
var projectRoot = path.resolve(__dirname, '../')
6-
var cssLoader = ExtractTextPlugin.extract('style-loader', 'css-loader')
8+
// var cssLoader = ExtractTextPlugin.extract('style-loader', 'css-loader')
79

810
module.exports = {
911
entry: {
@@ -38,20 +40,17 @@ module.exports = {
3840
test: /\.js$/,
3941
exclude: /node_modules/,
4042
loader: 'babel'
41-
},
42-
{
43-
test: /\.css$/,
44-
loader: cssLoader
45-
},
46-
{
47-
test: /\.s[a|c]ss$/,
48-
loader: ExtractTextPlugin.extract('style-loader','css-loader!sass-loader')
4943
}
5044
]
5145
},
5246
eslint: {
5347
formatter: require('eslint-friendly-formatter')
5448
},
49+
vue: {
50+
loaders: utils.cssLoaders({
51+
sourceMap: config.build.productionSourceMap
52+
})
53+
},
5554
babel: {
5655
presets: ['es2015'],
5756
plugins: ['transform-runtime']
@@ -73,6 +72,6 @@ if (process.env.NODE_ENV === 'production') {
7372
}
7473
}),
7574
new webpack.optimize.OccurenceOrderPlugin()
76-
// new ExtractTextPlugin('build.css')
75+
// new ExtractTextPlugin(utils.assetsPath('css/[name].[contenthash].css')),
7776
]
7877
}

0 commit comments

Comments
 (0)