43 lines
959 B
JavaScript
43 lines
959 B
JavaScript
|
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: [
|
||
|
{
|
||
|
test: /\.scss$/,
|
||
|
exclude: /node_modules/,
|
||
|
loader: ExtractTextPlugin.extract({
|
||
|
fallback: 'style-loader',
|
||
|
use: 'css-loader!sass-loader!postcss-loader'
|
||
|
})
|
||
|
},
|
||
|
{
|
||
|
test: /\.jpe?g$|\.gif$|\.png$|\.svg$/i,
|
||
|
loader: 'url-loader?limit=10000',
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
postcss: () => [
|
||
|
postcssFocus(),
|
||
|
cssnext({
|
||
|
browsers: ['last 2 versions', 'IE > 10'],
|
||
|
}),
|
||
|
postcssReporter({
|
||
|
clearMessages: true,
|
||
|
}),
|
||
|
],
|
||
|
};
|