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 }) ] };