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.
 
 
 
 
 

38 lines
975 B

var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: './js/index.js',
module: {
loaders: [
{
test: /\.js$/,
exclude: __dirname + '/node_modules',
loader: 'babel-loader',
query: {
presets: ['es2015']
}
},
{
test: /\.(scss|css)$/,
include: __dirname + '/css',
loader: ExtractTextPlugin.extract('css!sass?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]'),
},
{
test : /\.svg$/,
loader : 'file-loader?name=../[path][name].[ext]'
}
]
},
output: {
path: __dirname,
filename: './js/bundle.js'
},
plugins: [
new ExtractTextPlugin('./css/style.css', {
allChunks: true
})
]
};