Skip to content

Change the name of the "static" folder in build? #1061

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

Closed
tborenst opened this issue Nov 18, 2016 · 7 comments
Closed

Change the name of the "static" folder in build? #1061

tborenst opened this issue Nov 18, 2016 · 7 comments

Comments

@tborenst
Copy link

Is there a way to change the name of the static folder produced when you run npm run build? That includes the name of the folder itself as well as references to it in the index.html file generated.

Thanks!

@thien-do
Copy link
Contributor

thien-do commented Nov 19, 2016

Hi @tborenst, please see if #786 and #778 help you?

@tborenst
Copy link
Author

Sorry, I didn't see those. Thank you. Ended up writing a simple script for it.

@abdennour
Copy link

react-scripts build && mv build docs

Assuming docs is the new directory.

@cpannwitz
Copy link

I'd like to know, if there is now some way to handle this?
The previous answer by @abdennour just changes the name of the generated 'build' folder, but not the name and all references of the 'static' folder.

@tborenst How did you end up doing it, if I may ask?
Having the same problem and I can't change all the font/img/asset references in css & js every time.

Sorry for digging up this thread.
Thanks in advance.

@harunurhan
Copy link

I have this problem too and there is no obvious work around since the folder referenced in many places.

@gaearon Would it be acceptable, if I tried opening a PR to make static folder configurable via an environment variable?

@Glathrop
Copy link

This would be very helpful in some situations...

For instance, when setting the GKE ingress paths for sub-directory you need to specify both the subdirectory path /myapp1 AND /static. I'm struggling to figure out how to host two different CRA's when they both insist on /static.

I'm several hours into digging through K8 docs when a rename would fix the issue in about three minutes...

@cbinh951
Copy link

cbinh951 commented Jan 7, 2019

Can you guide me change the name of the "static" folder in build ?

@lock lock bot locked and limited conversation to collaborators Jan 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants