|
|
@@ -26,7 +26,11 @@ module.exports = { |
|
|
|
{test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader'}, |
|
|
|
{test: /\.(png|jpg|jpeg|gif)$/, loader: 'url?limit=10000&name=images/[name].[ext]',}, |
|
|
|
{test: /\.css$/, loader: ExtractTextPlugin.extract('style-loader', 'css-loader')}, |
|
|
|
{test: /\.(ttf|eot|svg|woff(2)?)(\?[a-z0-9=&.]+)?$/, loader: 'file-loader'} |
|
|
|
{test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff"}, |
|
|
|
{test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff"}, |
|
|
|
{test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/octet-stream"}, |
|
|
|
{test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file"}, |
|
|
|
{test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=image/svg+xml"}, |
|
|
|
] |
|
|
|
}, |
|
|
|
plugins: [ |
|
|
@@ -47,6 +51,7 @@ if (process.env.NODE_ENV === 'production') { |
|
|
|
module.exports.plugins = (module.exports.plugins || []).concat([ |
|
|
|
new webpack.optimize.DedupePlugin(), |
|
|
|
new webpack.optimize.OccurrenceOrderPlugin(), |
|
|
|
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), |
|
|
|
new webpack.optimize.UglifyJsPlugin({ |
|
|
|
compress: { |
|
|
|
warnings: true |
|
|
|