Open benknight opened 6 years ago
Chunks can change at any time, adding or removing them. I'm not sure having static keys would help too much.
This file should still be easily iterable programmatically.
Considering the use case mentioned in https://github.com/facebook/create-react-app/issues/5172:
Previously, I could just load the file referenced under the main.js
key, thus not caring about changes.
It looks like loading an application now requires the runtime (runtime~main.js
), the randomly named vendor chunk (static/js/1.ade53803.chunk.js
) and the actual entry script (main.js
).
How can a CRA-agnostic backend properly serve the application, if the vendor chunk is not statically keyed? Sorry, if this sounds like a dumb question.
I ended up parsing asset-manifest.json like this to compile a list of Githubissues.
Currently the asset-manifest.json in my build folder looks like this:
I want to be able to use this asset-manifest.json to reference and and include my own script tags. However, the vendor bundle has dynamic keys:
Is it possible to make these references something like
static/css/1.chunk.css
instead?Using react-scripts@2.0.3