1

This post is extention to issue in link. The previous problem was solved.

Everything was working fine till now when I added this route.

<Route path="/resume-builder/display" component={ResumeDisplay} />

I can visit this page via another page in the project when I refresh this page it shows error

GET http://localhost:8080/resume-builder/dist/bundle.js 404 (Not Found)

display:1 Refused to execute script from 'http://localhost:8080/resume-builder/dist/bundle.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

I dont know why my page is looking for bundles on /resume-builder/dist/bundle.js where it is clearly metioned in index.html that it has to pick bundles from

<script src="./dist/bundle.js" ></script>

Does any one have any clue what is the issue and what could be slution to this?

Ladoo
  • 169
  • 7

1 Answers1

0

Check your webpack file and add publicPath if not there as below.

 output: {
    filename: '[name].[hash].js',
    path: path.resolve('./dist'),
    publicPath: '/',
  }

Take help from below link.

https://tylermcginnis.com/react-router-cannot-get-url-refresh/

Kuldeep
  • 83
  • 1
  • 9