Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

index.html has broken path to assets/app.js #233

Closed
tylerjryan opened this issue Jun 10, 2016 · 2 comments
Closed

index.html has broken path to assets/app.js #233

tylerjryan opened this issue Jun 10, 2016 · 2 comments
Labels

Comments

@tylerjryan
Copy link

In src/index.html, the app.js file is sourced by this line here:

  <script type="text/javascript" src="/assets/app.js"></script>

When opening the dist/index.html file after running npm run dist, I am seeing this error in the console:

Failed to load resource: net::ERR_FILE_NOT_FOUND ...  file:///assets/app.js

I fixed this by simply changing the src path to:

  <script type="text/javascript" src="./assets/app.js"></script>

Notice the addition of the "." in front of /assets.

@weblogixx weblogixx added the bug label Jun 13, 2016
@weblogixx
Copy link
Member

HI @tylerjryan,

we just changed the path of assets/app.js to be absolute instead of relative. This is needed because when using react router with deep routes, app.js cannot be found. I will have a look at how to fix this for both dev and live versions.

@tylerjryan
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants