question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:7
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

12reactions
cpannwitzcommented, Sep 5, 2017

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.

3reactions
abdennourcommented, Jul 27, 2017
react-scripts build && mv build docs

Assuming docs is the new directory.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I change the name of the public folder in create-react-app ...
I was told by my project manager that I need to change the name of the 'public' directory to 'static' (this directory holds/will...
Read more >
Build & Deploy - Hands on React
Inside the build/static directory will be your JavaScript and CSS files. Each filename inside of build/static will contain a unique hash of the...
Read more >
Serving static files in Express
Express looks up the files relative to the static directory, so the name of the static directory is not part of the URL....
Read more >
Using the Static Folder - Gatsby
The static folder is useful as a workaround for a number of less common cases: You need a file with a specific name...
Read more >
How to manage static files (e.g. images, JavaScript, CSS)
In your templates, use the static template tag to build the URL for the given relative ... Store your static files in a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found