production build: change name
See original GitHub issueIs this a bug report?
No. Just a question
Question
Is het possible to change the production build .js name?
npm run build
is now generating a file with a name like :
runtime~main.fdfcfda2.js (using react-scripts 2.1.5)
The issue I am having is that when I deploy to an SAP server it is failing because the special character '~` in the file is not allowed.
I think it is more a SAP problem but maybe it is simple to change the generated name (without ejecting ofcourse)
btw: is it important to have this special character in the name?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
create-react-app production build renames functions
I have created a class (ActionIndex) that imports and indexes an initial set of functions in a separate file (actions.ts) so they can...
Read more >Creating a Production Build - Create React App
npm run build creates a build directory with a production build of your app ... This hash in the file name enables long...
Read more >Reactjs Build Production: Optimize Performance - CopyCat Blog
Notice that for files within the build/static folder, a unique hash is appended to the file name. This hash code is generated based...
Read more >API - ESBuild
There are two main API calls in esbuild's API: transform and build. ... JSX fragment; JSX import source; JSX side effects; Keep names;...
Read more >Prepare and roll out a release - Play Console Help
Production : Production releases are available to all Google Play users in your ... in Play Console only, such as an internal code...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://github.com/webpack/webpack/issues/6710
Seems like webpack just started it that way, but when questioned about it, didn’t really push back that there was a reason for it. They added the ability to change it in a release soon after.
Would changing it in the default CRA config have any adverse effects? I can’t think of any.
I think the changes required for this would be changing this:
https://github.com/facebook/create-react-app/blob/1548a0a92e41f9f626aa2c5226fb1a2cb2ec9229/packages/react-scripts/config/webpack.config.js#L254
to
and
https://github.com/facebook/create-react-app/blob/1548a0a92e41f9f626aa2c5226fb1a2cb2ec9229/packages/react-scripts/config/webpack.config.js#L549
to
Not sure if the special character there is for some special reason, probably not. Would you like to submit a PR?