-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
JS and CSS files not found after parcel build #470
Comments
Change |
@DeMoorJasper still does not solves the issue. |
ow my bad, i misread the start command. |
|
Sorry i forgot a dot try |
Ok @DeMoorJasper that solves the wrong I think that is not a |
This is a react-router issue, just has to do with filesystem not being a valid url, it should work fine if u test it on an apache,nginx,.. server |
@DeMoorJasper Thanks for helping 😄 |
But the default for --public-url should be ./ instead of ./dist/ since the index.html is in the dist folder. |
Now it's right here https://parceljs.org/cli.html#set-the-public-url-to-serve-on |
@DeMoorJasper, I'm sorry, but I don't see that in the docs. So I had to google this issues :( |
Can i know what is the solution for this ? why it was closed ? |
For me the sollution seemed to be to add |
This worked for me too. |
I couldn't properly deploy a project (parcel bundler) on gh-pages. For me it was completely new subject, but finally I have found this post and now the code works just fine, thanks!
|
Both pages lead to 404s and none of the solutions here work for me. |
This link should now be -> https://parceljs.org/features/production/ |
🐛 bug report
parcel build index.html
generates thedist
folder with all the files, but launchingindex.html
from inside thedist
results incan not find css and the js files
.🎛 Configuration (.babelrc, package.json, cli command)
.babelrc:-
package.json
cli command
:parcel build index.html
🤔 Expected Behavior
Produces the build folder with the correct bundles instead of reporting missing
css
andjs
files in the browser console.😯 Current Behavior
Errors in browser console on launching
index.html
from the build folderdist
.💁 Possible Solution
change
src
inscript
andlink
tags to remove errors.eg:- change
src="/dist/cfb47e75612b85db2daa42a5bbad3b67.js"
tosrc="./cfb47e75612b85db2daa42a5bbad3b67.js"
But still, only half of the page is displayed
🔦 Context
Trying to produce the production build for a test deployment.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: