-
Notifications
You must be signed in to change notification settings - Fork 10.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
Don't share public
folder between dev and build
#4512
Comments
What problems specifically did this cause you? |
It was around loading external Maybe riskier is the other way around: if I'm not aware of this shared folder dependency, I would expect that when I run You could say that my workflow was problematic or that I didn't understand enough of how |
Hmmm I'm still not sure what happened. Generally though, the workflow we support is importing the jquery (or other packages) from NPM and letting webpack bundle your JavaScript together. You should rarely if ever be writing So:
If you can figure out how the dev server and production builds interacted — it'd be great to fix that. |
Thanks. Maybe a question: when I do |
Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help! |
I've been working with Gatsby for the past few days and have already been bitten by the fact that the
/public
folder is shared between the dev server and the eventual build. Maybe as a workaround I could use something likegatsby build --output-dir dist
as proposed in #1878 but I still think it's generally a bad idea to let dev server influence the build and vice versa (it happened to me).The text was updated successfully, but these errors were encountered: