Skip to content

Instantly share code, notes, and snippets.

@petyosi
Created February 9, 2018 14:47
Show Gist options
  • Save petyosi/adb9696a267e79d9a0330491adb775c5 to your computer and use it in GitHub Desktop.
Save petyosi/adb9696a267e79d9a0330491adb775c5 to your computer and use it in GitHub Desktop.
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, './dist/'),
filename: 'bundle.js'
},
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015']
}
},
{
test: /\.css$/,
loader: ExtractTextPlugin.extract('css-loader')
}
]
},
plugins: [
new ExtractTextPlugin('style.css')
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment