mirror of
https://github.com/a2nt/silverstripe-webpack.git
synced 2024-10-22 17:05:31 +02:00
minor update
This commit is contained in:
parent
c00f5f33e3
commit
eb65b637b3
@ -9,10 +9,9 @@ const common = require('./webpack.config.common.js');
|
|||||||
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const autoprefixer = require('autoprefixer');
|
const autoprefixer = require('autoprefixer');
|
||||||
const ExtractTextPlugin = require("extract-text-webpack-plugin");
|
|
||||||
|
|
||||||
//const OptimizeCSSAssets = require('optimize-css-assets-webpack-plugin');
|
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||||
const FaviconsWebpackPlugin = require("favicons-webpack-plugin");
|
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
|
||||||
|
|
||||||
module.exports = merge(common, {
|
module.exports = merge(common, {
|
||||||
|
|
||||||
@ -24,13 +23,14 @@ module.exports = merge(common, {
|
|||||||
|
|
||||||
module: {
|
module: {
|
||||||
rules: [{
|
rules: [{
|
||||||
test: /\.scss$/,
|
test: /\.s?css$/,
|
||||||
use: ExtractTextPlugin.extract({
|
use: ExtractTextPlugin.extract({
|
||||||
fallback: "style-loader",
|
fallback: "style-loader",
|
||||||
use: [{
|
use: [{
|
||||||
loader: 'css-loader',
|
loader: 'css-loader',
|
||||||
options: {
|
options: {
|
||||||
sourceMap: true
|
sourceMap: true,
|
||||||
|
minimize: true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
loader: 'postcss-loader',
|
loader: 'postcss-loader',
|
||||||
@ -90,6 +90,10 @@ module.exports = merge(common, {
|
|||||||
'NODE_ENV': JSON.stringify('production')
|
'NODE_ENV': JSON.stringify('production')
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
new webpack.LoaderOptionsPlugin({
|
||||||
|
minimize: true,
|
||||||
|
debug: false
|
||||||
|
}),
|
||||||
new webpack.optimize.ModuleConcatenationPlugin(),
|
new webpack.optimize.ModuleConcatenationPlugin(),
|
||||||
new webpack.optimize.UglifyJsPlugin({
|
new webpack.optimize.UglifyJsPlugin({
|
||||||
sourceMap: true,
|
sourceMap: true,
|
||||||
@ -99,7 +103,7 @@ module.exports = merge(common, {
|
|||||||
filename: 'css/[name].css',
|
filename: 'css/[name].css',
|
||||||
allChunks: true
|
allChunks: true
|
||||||
}),
|
}),
|
||||||
//new OptimizeCSSAssets(),
|
|
||||||
new FaviconsWebpackPlugin({
|
new FaviconsWebpackPlugin({
|
||||||
logo: path.join(__dirname, conf.SRC) + '/favicon.png',
|
logo: path.join(__dirname, conf.SRC) + '/favicon.png',
|
||||||
prefix: '/icons/',
|
prefix: '/icons/',
|
||||||
|
Loading…
Reference in New Issue
Block a user