Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There are no "style.css", "index.html" in bundles of generateBundle hook #6434

Closed
7 tasks done
AlttiRi opened this issue Jan 11, 2022 · 2 comments
Closed
7 tasks done

Comments

@AlttiRi
Copy link

AlttiRi commented Jan 11, 2022

Describe the bug

There are no "style.css", "index.html" properties in bundles argument of generateBundle(opts, bundles, isWrite) hook when I use a plugin as a Vite plugin (plugin: [myPlugin()]), not as a Rollup plugin (build.rollupOptions.plugins: [myPlugin()]).

bundles argument value looks like this: {"index.js": {...}, "vendor.js": {...}}.
"style.css", "index.html" fields are missed, while they exist when I use the same plugin in build.rollupOptions.plugins array.

For the reproduction uncomment these lines of the minimal reproduction repo

The related bug: #6421

Reproduction

https://github.com/AlttiRi/serve-json-gz-length-test

System Info

OS: Windows 10 10.0.19043
Node: 17.3.0
Yarn: 1.22.5
npm: 7.19.1
vite: 2.7.2

Used Package Manager

npm

Logs

No response

Validations

@AlttiRi
Copy link
Author

AlttiRi commented Feb 14, 2022

So, CSS extraction will no longer be supported?

Both this issue and #6421 are not resolved.

@sapphi-red
Copy link
Member

enforce: 'post' needs to be set to obtain "style.css", "index.html".
Closing as I confirmed setting enforce: 'post' will include them in the output ([cssBundlePlugin][debug]: bundles:).

@github-actions github-actions bot locked and limited conversation to collaborators Jun 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants