Static keys for vendor bundle in asset-manifest.json
See original GitHub issueCurrently the asset-manifest.json in my build folder looks like this:
{
"main.css": "/static/css/main.f4f38731.chunk.css",
"main.js": "/static/js/main.56255761.chunk.js",
"main.js.map": "/static/js/main.56255761.chunk.js.map",
"static/css/1.36ceda45.chunk.css": "/static/css/1.36ceda45.chunk.css",
"static/js/1.ade53803.chunk.js": "/static/js/1.ade53803.chunk.js",
"static/js/1.ade53803.chunk.js.map": "/static/js/1.ade53803.chunk.js.map",
"runtime~main.js": "/static/js/runtime~main.229c360f.js",
"runtime~main.js.map": "/static/js/runtime~main.229c360f.js.map",
"static/media/icons.svg": "/static/media/icons.6e39cadf.svg",
"static/media/logo.svg": "/static/media/logo.61c6330d.svg",
"static/media/help_logo.svg": "/static/media/help_logo.1ef27f5c.svg",
"static/media/help_logo_mark.svg": "/static/media/help_logo_mark.8265813a.svg",
"static/media/youtube_icon.svg": "/static/media/youtube_icon.d435ea9a.svg",
"static/media/guarantee_emblem.svg": "/static/media/guarantee_emblem.d49af9a1.svg",
"static/css/main.f4f38731.chunk.css.map": "/static/css/main.f4f38731.chunk.css.map",
"static/css/1.36ceda45.chunk.css.map": "/static/css/1.36ceda45.chunk.css.map",
"index.html": "/index.html",
"precache-manifest.be82c4ddabdcb9e12cd3d143baad1412.js": "/precache-manifest.be82c4ddabdcb9e12cd3d143baad1412.js",
"service-worker.js": "/service-worker.js"
}
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:
"static/css/1.36ceda45.chunk.css": "/static/css/1.36ceda45.chunk.css",
"static/js/1.ade53803.chunk.js": "/static/js/1.ade53803.chunk.js",
"static/js/1.ade53803.chunk.js.map": "/static/js/1.ade53803.chunk.js.map",
Is it possible to make these references something like static/css/1.chunk.css
instead?
Using react-scripts@2.0.3
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Top 5 webpack-assets-manifest Code Examples - Snyk
Learn more about how to use webpack-assets-manifest, based on webpack-assets-manifest code examples created from the most popular ways it is used in public ......
Read more >handling of static assets with webpack-manifest-plugin in a ...
Problem 1: In the manifest I only get the key of the new location but ... My second approach was to define a...
Read more >The Build Series: E3 — Micro-Frontends are Awesome!
In this episode of The Build Series, We'll explore some Micro-Frontend design patterns for web applications and build one using React.
Read more >Issues · facebook/create-react-app · GitHub
Static keys for vendor bundle in asset-manifest.json issue: proposal ... [ModuleScopePlugin] problem with nested package.json in linked dependencies issue: ...
Read more >How to Deploy a React + Flask Project - miguelgrinberg.com
You can control this with the homepage field in your package.json. ... To achieve this we need to point Flask's static folder to...
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
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.
Hello, have same issue. We have hashed keys due configs in webpack.config.prod.js, where name is ‘false’.
splitChunks: { chunks: 'all', name: false, },
When I change this totrue
, I get normal names, so I can get vendors~main.js from asset-manifest.jsonCan be used next workaround within https://www.npmjs.com/package/@craco/craco