Created
January 7, 2019 16:04
-
-
Save buglessir/3272c9e0ab5dd3cb7ba2c5c729797e17 to your computer and use it in GitHub Desktop.
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 path = require('path'); | |
var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
var HtmlWebpackPluginConfig = new HtmlWebpackPlugin({ | |
template: path.resolve(__dirname, 'src/index.html') | |
}); | |
module.exports = { | |
entry: path.resolve(__dirname, 'src/index.js'), | |
output: { | |
filename: 'bundle.js', | |
path: path.resolve(__dirname, 'build') | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.(js|jsx)$/, | |
use: 'babel-loader', | |
exclude: /node_modules/ | |
}, | |
{ | |
test: /\.css$/, | |
use: ['style-loader', 'css-loader'] | |
} | |
] | |
}, | |
plugins: [HtmlWebpackPluginConfig] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment