2016-10-06 15:59:19 +02:00
|
|
|
/* eslint global-require: 0 */
|
|
|
|
|
2016-09-15 20:04:45 +02:00
|
|
|
const webpack = require('webpack');
|
2016-09-13 17:08:26 +02:00
|
|
|
|
2016-02-25 00:45:56 -08:00
|
|
|
module.exports = {
|
|
|
|
module: {
|
|
|
|
loaders: [
|
|
|
|
{
|
2016-10-12 19:17:37 +02:00
|
|
|
test: /\.(png|eot|woff|woff2|ttf|svg|gif)(\?v=\d+\.\d+\.\d+)?$/,
|
2016-10-06 15:59:19 +02:00
|
|
|
loader: 'url-loader?limit=100000',
|
2016-02-25 00:45:56 -08:00
|
|
|
},
|
2016-09-15 18:53:24 +02:00
|
|
|
{
|
|
|
|
test: /\.json$/,
|
2016-10-06 15:59:19 +02:00
|
|
|
loader: 'json-loader',
|
2016-09-15 18:53:24 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
|
|
|
loader: 'style!css?modules!sass',
|
|
|
|
},
|
2016-06-28 15:28:42 -03:00
|
|
|
{
|
|
|
|
test: /\.css$/,
|
2016-09-13 17:18:19 +02:00
|
|
|
loader: 'style!css?modules&importLoaders=1&&localIdentName=cms__[name]__[local]!postcss',
|
2016-06-28 15:28:42 -03:00
|
|
|
},
|
2016-02-25 00:45:56 -08:00
|
|
|
{
|
|
|
|
loader: 'babel',
|
|
|
|
test: /\.js?$/,
|
|
|
|
exclude: /(node_modules|bower_components)/,
|
|
|
|
query: {
|
|
|
|
cacheDirectory: true,
|
|
|
|
presets: ['react', 'es2015'],
|
2016-09-13 17:08:26 +02:00
|
|
|
plugins: [
|
|
|
|
'transform-class-properties',
|
|
|
|
'transform-object-assign',
|
|
|
|
'transform-object-rest-spread',
|
|
|
|
'lodash',
|
2016-10-06 15:59:19 +02:00
|
|
|
'react-hot-loader/babel',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2016-02-25 00:45:56 -08:00
|
|
|
},
|
2016-06-28 15:28:42 -03:00
|
|
|
postcss: [
|
2016-07-05 15:48:18 -03:00
|
|
|
require('postcss-import')({ addDependencyTo: webpack }),
|
2016-10-06 15:59:19 +02:00
|
|
|
require('postcss-cssnext'),
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
new webpack.DefinePlugin({
|
|
|
|
'process.env': {
|
|
|
|
NODE_ENV: JSON.stringify(process.env.NODE_ENV),
|
|
|
|
},
|
|
|
|
}),
|
2016-06-28 15:28:42 -03:00
|
|
|
],
|
2016-02-25 00:45:56 -08:00
|
|
|
};
|