Skip to content

Generate manifest.json during build process #3383

@wujekbogdan

Description

@wujekbogdan

What 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions