Created
February 28, 2016 13:53
-
-
Save typoerr/b0767bff34f75b3d4b74 to your computer and use it in GitHub Desktop.
webpack.config.jsのテンプレート
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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