You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
976 B
42 lines
976 B
var ExtractTextPlugin = require('extract-text-webpack-plugin');
|
|
|
|
module.exports = {
|
|
entry: './index.js',
|
|
|
|
module: {
|
|
loaders: [
|
|
{
|
|
test: /\.js$/,
|
|
exclude: __dirname + '/node_modules',
|
|
loader: 'babel',
|
|
query: {
|
|
presets: ['es2015', 'react']
|
|
}
|
|
},
|
|
{
|
|
test: /\.scss$/,
|
|
include: __dirname + '/sass',
|
|
loader: ExtractTextPlugin.extract('css!sass')
|
|
},
|
|
{
|
|
test: /\.png$/,
|
|
loader: "file?name=[path][name].[ext]"
|
|
},
|
|
{
|
|
test : /\.woff2?$/,
|
|
loader : 'file-loader'
|
|
}
|
|
]
|
|
},
|
|
|
|
output: {
|
|
path: __dirname,
|
|
filename: 'bundle.js'
|
|
},
|
|
|
|
plugins: [
|
|
new ExtractTextPlugin('style.css', {
|
|
allChunks: true
|
|
})
|
|
]
|
|
};
|
|
|