static-cms/webpack.base.js

46 lines
1.1 KiB
JavaScript
Raw Normal View History

const webpack = require('webpack');
2016-09-13 17:08:26 +02:00
2016-02-25 00:45:56 -08:00
module.exports = {
module: {
loaders: [
{
test: /\.((png)|(eot)|(woff)|(woff2)|(ttf)|(svg)|(gif))(\?v=\d+\.\d+\.\d+)?$/,
2016-07-05 15:48:18 -03:00
loader: 'url-loader?limit=100000'
2016-02-25 00:45:56 -08:00
},
2016-09-15 18:53:24 +02:00
{
test: /\.json$/,
loader: 'json-loader'
},
{
test: /\.scss$/,
loader: 'style!css?modules!sass',
},
{
test: /\.css$/,
loader: 'style!css?modules&importLoaders=1&&localIdentName=cms__[name]__[local]!postcss',
},
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',
'react-hot-loader/babel'
]
2016-02-25 00:45:56 -08:00
}
}
]
},
postcss: [
2016-07-05 15:48:18 -03:00
require('postcss-import')({ addDependencyTo: webpack }),
require('postcss-cssnext')
],
2016-02-25 00:45:56 -08:00
};