Skip to content

Instantly share code, notes, and snippets.

@apotox
Created May 24, 2019 15:31
Show Gist options
  • Save apotox/eccffa062023a8d5bd59670ebd5e0960 to your computer and use it in GitHub Desktop.
Save apotox/eccffa062023a8d5bd59670ebd5e0960 to your computer and use it in GitHub Desktop.
webpack configuration to build client side javascript files for Netlify project
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = {
entry: {
main: "./src/index.js"
},
output: {
filename: "main.js",
path: path.resolve("dist/client")
},
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