Reputation: 142
Please find my repo@ https://github.com/reachlinlen/empexplorer Webpack configuration is https://github.com/reachlinlen/empexplorer/blob/master/webpack.config.js
Why index.html is not rendering the pages after npm run build? Does Tailwind css is causing any issue?
Upvotes: 0
Views: 790
Reputation: 31
I found another way to serve the webpack 5 build version.
In terminal
npm i -g http-server
cd dist && http-server
Now your build version should be on http://127.0.0.1:8080
.
I hope this can help someone who is still bothering by this issue.
Upvotes: 0
Reputation: 535
All is good with your build (but don't forget to add "axios" in dependencies). You need to use a HashRouter instead of BrowserRouter if you want your application will work with static file server (like www.test.com/path/index.html).
Upvotes: 1