-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Serve assets from public/
instead of .
#503
Comments
A little sad that issue 503 isn't a crashing bug 😞 |
Are we serving assets from root directory? If we are, we should disable that. We never intended this to be the case. |
eg hitting |
Um, this certainly was not the intention. |
Would you be opposed to the creation of a |
What is the use case for doing that, as opposed to importing asset files from JS? |
If I understand this bug correctly, serving favicon like files for things like iOS etc requires something like it:
I currently have a static dir in my root, and then a build task that moves the directories in that directory in the build tree after npm build. Don't know how else to serve those assets both in dev and prod. |
@davidascher I think that use case will be addressed by #226 and #413. |
Agreed, those PRs seem to be sufficient. |
Looking now i dont think #226 is sufficient. I'd propose hoisting @davidascher I stated it in #226 but having a static folder I think would be a mistake because it provides 2 places for assets to go without a clear reason for them to be in any particular location. All of the assets in your example do not require a specific name so could go though transformations to gain cdn busting abilities and a unified pipeline. I guess this issue is really asking for a way to have webpack parse and replace static files within the |
That’s the approach I’m going to take in 0.5.0. |
By serving assets from the root directory you cannot have routes that have names the same as the folders built in such as
src
or any other you add to the app.If we put
index.html
and all other static assets within apublic
folder this would only expose the assets that are needed.The text was updated successfully, but these errors were encountered: