Generate manifest.json during build process
See original GitHub issueWhat problem does this feature solve?
I’ve been working lately on non-SPA, non-Vue app. In order not to write the whole Webpack config on my own I took a great symfony/webpack-encore config. I think there’s one thing that Vue CLI could learn from symfony/webpack-encore - it’s manifest.json
In webpack-encore the build process generates a manifest.json file that lists all the assets generated during build. Then, the backend code can read the content of the file and enqueue all the assets. It’s especially helpful when assets names are hashed.
Example content of the manifest.json file after running yarn serve
{
"app.css": "http://localhost:8080/app.css",
"app.js": "http://localhost:8080/app.js",
}
Example content of the manifest.json file after running yarn build
{
"app.css": "dist/app.9743a66f914cc249efca164485a19c5c.css",
"app.js": "dist/app.098f6bcd4621d373cade4e832627b4f6.js",
}
What does the proposed API look like?
I’m not sure if manifest.json should be generated by default, but for sure there should be a setting allowing enabling/disabling manifset.json generation.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:11 (4 by maintainers)
Top GitHub Comments
I added my own asset-manifest.json file on my own using the proposed lib.
I can see why this might not be added to vue-cli, as it was pretty easy to implement independently.
status of manifest.json is not clear for me, when using @vue/cli-plugin-pwa. A manifest.json is added in the public folder when the plugin is initialized. This file is copied to dist. But never updated. IMO a manifest.json should not be added to the public folder, but generated for each build, respecting configurations from the vue.config.js ?