The static website got published but was blank. Throwing the following error:
CodePudding user response:
The webpack.config.js file has a publicpath object which specifies the base path of all your assets. It is set by default as
output: {
publicPath: "http://localhost:8080/main.js" ,
},
Make it as
output: {
publicPath: 'auto',
},
CodePudding user response:
in webpack config:
output: {
filename: "bundle.js",
// whatever path folder
path: path.join(__dirname, "dist"),
publicPath: "/",
},
In netlify, you have publish directory property. Since I output to "dist"


