We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fb2561 commit d463bd9Copy full SHA for d463bd9
packages/vite/src/node/build.ts
@@ -212,6 +212,7 @@ export interface LibraryOptions {
212
name?: string
213
formats?: LibraryFormats[]
214
fileName?: string | ((format: ModuleFormat) => string)
215
+ emitAssets?: boolean
216
}
217
218
export type LibraryFormats = 'es' | 'cjs' | 'umd' | 'iife'
packages/vite/src/node/plugins/asset.ts
@@ -287,7 +287,7 @@ async function fileToBuiltUrl(
287
288
let url: string
289
if (
290
- config.build.lib ||
+ (config.build.lib && !config.build.lib.emitAssets) ||
291
(!file.endsWith('.svg') &&
292
content.length < Number(config.build.assetsInlineLimit))
293
) {
0 commit comments