We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have made a plugin, which converts, for example:
import { Button } from 'my-package';
to:
import { Button } from 'my-package'; import 'my-package/es/style';
Vite's dependency bundling can only bundle the main js of a package. Here is no way to tell Vite to pre-bundle extra stuff, like styles.
Provide a hook to pre-bundle extra scripts/styles.
For example:
function plugin () { return { preBundleExtra: (pkgName) => { if (pkgName.startsWith('@myorg/')) { return [pkgName + '/es/style', pkgName + '/es/polyfill', ]; } else { return []; } } } }
No response
The text was updated successfully, but these errors were encountered:
You can use the config hook to edit optimizeDeps.include.
config
optimizeDeps.include
Note that CSS pre-bundling is not supported: #7719
Sorry, something went wrong.
No branches or pull requests
Description
I have made a plugin, which converts, for example:
to:
Vite's dependency bundling can only bundle the main js of a package. Here is no way to tell Vite to pre-bundle extra stuff, like styles.
Suggested solution
Provide a hook to pre-bundle extra scripts/styles.
For example:
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: