2018-05-03 02:34:03 +02:00
|
|
|
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
|
|
|
const cssnext = require('postcss-cssnext');
|
|
|
|
const postcssFocus = require('postcss-focus');
|
|
|
|
const postcssReporter = require('postcss-reporter');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
output: {
|
|
|
|
publicPath: '/',
|
|
|
|
libraryTarget: 'commonjs2',
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: ['', '.js', '.jsx'],
|
|
|
|
modules: [
|
|
|
|
'client',
|
|
|
|
'node_modules',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
loaders: [
|
|
|
|
{
|
2018-07-30 18:20:57 +02:00
|
|
|
test: /main\.scss$/,
|
2018-05-03 02:34:03 +02:00
|
|
|
exclude: /node_modules/,
|
|
|
|
loader: ExtractTextPlugin.extract({
|
|
|
|
fallback: 'style-loader',
|
|
|
|
use: 'css-loader!sass-loader!postcss-loader'
|
|
|
|
})
|
|
|
|
},
|
|
|
|
{
|
2018-05-04 23:26:20 +02:00
|
|
|
test: /\.jpe?g$|\.gif$|\.png$|\.svg$|\.mp3$|\.eot$|\.ttf$|\.woff$|\.woff2$/i,
|
2018-05-03 02:34:03 +02:00
|
|
|
loader: 'url-loader?limit=10000',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
postcss: () => [
|
|
|
|
postcssFocus(),
|
|
|
|
cssnext({
|
|
|
|
browsers: ['last 2 versions', 'IE > 10'],
|
|
|
|
}),
|
|
|
|
postcssReporter({
|
|
|
|
clearMessages: true,
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
};
|