Config extra entry for html.min.css
This commit is contained in:
@@ -3,7 +3,7 @@ var webpack = require('webpack');
|
||||
var path = require('path');
|
||||
var ExtractTextPlugin = require("extract-text-webpack-plugin");
|
||||
|
||||
module.exports = Object.assign({}, baseConfig, {
|
||||
module.exports = [Object.assign({}, baseConfig, {
|
||||
plugins: baseConfig.plugins.concat([
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
@@ -25,4 +25,33 @@ module.exports = Object.assign({}, baseConfig, {
|
||||
publicPath: '/build/',
|
||||
filename: '[id].[name].[hash].js'
|
||||
}
|
||||
});
|
||||
}), {
|
||||
entry: {
|
||||
htmlExport: path.join(__dirname, 'public/js/htmlExport.js')
|
||||
},
|
||||
module: {
|
||||
loaders: [{
|
||||
test: /\.css$/,
|
||||
loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
|
||||
}, {
|
||||
test: /\.scss$/,
|
||||
loader: ExtractTextPlugin.extract('style-loader', 'sass-loader')
|
||||
}, {
|
||||
test: /\.less$/,
|
||||
loader: ExtractTextPlugin.extract('style-loader', 'less-loader')
|
||||
}]
|
||||
},
|
||||
output: {
|
||||
path: path.join(__dirname, 'public/build'),
|
||||
publicPath: '/build/',
|
||||
filename: '[name].js'
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
'NODE_ENV': JSON.stringify('production')
|
||||
}
|
||||
}),
|
||||
new ExtractTextPlugin("html.min.css")
|
||||
]
|
||||
}];
|
||||
|
||||
Reference in New Issue
Block a user