You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer using Vite I want to specify whether an asset should be inlined or not. In my use case I have a internal icon library with SVG files with fragments. This library is build in library mode with Vite.
I think there might be more use cases where specifc files/file types should be inlined or not.
I can submit a PR if you want.
Suggested solution
In module vite/src/node/plugins/asset.ts we could add a config callback, so that the developer can specify per file if this should be inlined or not.
Description
As a developer using Vite I want to specify whether an asset should be inlined or not. In my use case I have a internal icon library with SVG files with fragments. This library is build in library mode with Vite.
I think there might be more use cases where specifc files/file types should be inlined or not.
I can submit a PR if you want.
Suggested solution
In module
vite/src/node/plugins/asset.ts
we could add a config callback, so that the developer can specify per file if this should be inlined or not.Example:
vite.config.ts
vite/src/node/plugins/asset.ts
vite/packages/vite/src/node/plugins/asset.ts
Lines 347 to 355 in b1a6c84
Add some later stage, this could be merged into one config together with
assetsInclude
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: