Skip to content

Instantly share code, notes, and snippets.

@jogeshpi03
Created October 6, 2018 02:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jogeshpi03/044621b276af94d23670f72b1ac8dc6d to your computer and use it in GitHub Desktop.
Save jogeshpi03/044621b276af94d23670f72b1ac8dc6d to your computer and use it in GitHub Desktop.
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = {
entry: "./src/index.js",
output: {
path: path.join(__dirname, "/dist"),
filename: "index-bundle.js"
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: ["babel-loader"]
},
{
test: /\.css$/,
use: ["style-loader", "css-loader"]
}
]
},
plugins: [
new HtmlWebpackPlugin({
template: "./src/index.html"
})
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment