Last active
October 8, 2016 08:37
-
-
Save Dvisacker/8d1f8deab54b3d8da3db86de7ec7745a to your computer and use it in GitHub Desktop.
JS Webpack Config Template
This file contains hidden or 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
| //Template of web.config.js gist | |
| var HtmlWebpackPlugin = require('html-webpack-plugin') | |
| var HTMLWebpackPluginConfig = new HtmlWebpackPlugin({ | |
| template: __dirname + 'index.html', | |
| filename: 'index.html', | |
| inject: 'body' | |
| }); | |
| module.exports = { | |
| entry: './index.js', | |
| output: { | |
| path: __dirname + '/dist', | |
| filename: 'index_bundle.js' | |
| }, | |
| module: { | |
| loaders: [ | |
| {test: /\.css$/, exclude: /node_modules/, loader: 'style!css!' } | |
| {test: /\.js$/, exclude: /node_modules/, loader: "babel-loader"} | |
| ] | |
| }, | |
| plugins: [HTMLWebpackPluginConfig] | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment