mirror of
https://github.com/react-webpack-generators/generator-react-webpack.git
synced 2025-12-08 18:01:59 +00:00
65 lines
1.3 KiB
JavaScript
65 lines
1.3 KiB
JavaScript
/*
|
|
* Webpack distribution configuration
|
|
*
|
|
* This file is set up for serving the distribution version. It will be compiled to dist/ by default
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
var webpack = require('webpack');
|
|
|
|
module.exports = {
|
|
output: {
|
|
publicPath: '/assets/',
|
|
path: 'dist/assets/',
|
|
filename: 'main.js'
|
|
},
|
|
|
|
debug: false,
|
|
devtool: false,
|
|
entry: './src/scripts/components/<%= pkg.mainInput %>.jsx',
|
|
|
|
stats: {
|
|
colors: true,
|
|
reasons: false
|
|
},
|
|
|
|
plugins: [
|
|
new webpack.optimize.DedupePlugin(),
|
|
new webpack.optimize.UglifyJsPlugin(),
|
|
new webpack.optimize.OccurenceOrderPlugin(),
|
|
new webpack.optimize.AggressiveMergingPlugin()
|
|
],
|
|
|
|
resolve: {
|
|
extensions: ['','.js','.jsx']
|
|
},
|
|
|
|
module: {
|
|
preLoaders: [{
|
|
test: '\\.js$',
|
|
exclude: 'node_modules',
|
|
loader: 'jshint'
|
|
}],
|
|
|
|
loaders: [
|
|
{
|
|
test: /\.css$/,
|
|
loader: 'style!css'
|
|
}, {
|
|
test: /\.gif/,
|
|
loader: 'url-loader?limit=10000&mimetype=image/gif'
|
|
}, {
|
|
test: /\.jpg/,
|
|
loader: 'url-loader?limit=10000&mimetype=image/jpg'
|
|
}, {
|
|
test: /\.png/,
|
|
loader: 'url-loader?limit=10000&mimetype=image/png'
|
|
}, {
|
|
test: /\.jsx$/,
|
|
loader: 'jsx-loader'
|
|
}
|
|
]
|
|
}
|
|
};
|