Skip to content

Instantly share code, notes, and snippets.

@williameliel
Last active October 19, 2021 15:53
Show Gist options
  • Save williameliel/8867f6d0b5709c29b959c44f4a75b598 to your computer and use it in GitHub Desktop.
Save williameliel/8867f6d0b5709c29b959c44f4a75b598 to your computer and use it in GitHub Desktop.
const HtmlWebpackPlugin = require("html-webpack-plugin");
const webpack = require("webpack");
module.exports = {
entry: "./src/index.js",
mode: "development",
target: "web",
devServer: {
historyApiFallback: true,
},
output: {
path: `${__dirname}/dist`,
filename: "bundle.js",
},
plugins: [
new HtmlWebpackPlugin({ template: "./src/index.html" }),
new webpack.ProvidePlugin({
process: "process/browser",
}),
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment