Skip to content

Instantly share code, notes, and snippets.

@typoerr
Created February 28, 2016 13:53
Show Gist options
  • Save typoerr/b0767bff34f75b3d4b74 to your computer and use it in GitHub Desktop.
Save typoerr/b0767bff34f75b3d4b74 to your computer and use it in GitHub Desktop.
webpack.config.jsのテンプレート
var WebpackNotifierPlugin = require('webpack-notifier');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
devtool: 'inline-source-map',
entry: './src/js/index.js',
output: {
path: "./dist",
filename: "bundle.js"
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['es2015', 'react']
}
},
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract("style-loader", "css-loader!sass-loader")
}
]
},
resolve: {
extensions: ['', '.js', '.jsx', '.css', '.scss']
},
plugins: [
new WebpackNotifierPlugin({ title: 'Webpack' }),
new ExtractTextPlugin("bundle.css")
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment