Skip to content

Instantly share code, notes, and snippets.

@pinglinh
Last active March 12, 2018 15:27
Show Gist options
  • Save pinglinh/39861b182d0406f8218a2d6eeaf0b96b to your computer and use it in GitHub Desktop.
Save pinglinh/39861b182d0406f8218a2d6eeaf0b96b to your computer and use it in GitHub Desktop.
const HtmlWebPackPlugin = require("html-webpack-plugin");
const htmlWebpackPlugin = new HtmlWebPackPlugin({
template: "./src/index.html",
filename: "./index.html"
});
module.exports = {
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader"
}
},
{
test: /\.css$/,
use: ["style-loader", "css-loader"]
}
]
},
plugins: [htmlWebpackPlugin]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment