File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -208,6 +208,12 @@ export interface BuildOptions {
208
208
* directives in production.
209
209
*/
210
210
ssrManifest ?: boolean | string
211
+ /**
212
+ * Emit assets during SSR.
213
+ * @experimental
214
+ * @default false
215
+ */
216
+ ssrEmitAssets ?: boolean
211
217
/**
212
218
* Set to false to disable reporting compressed chunk sizes.
213
219
* Can slightly improve build speed.
@@ -324,6 +330,7 @@ export function resolveBuildOptions(
324
330
lib : false ,
325
331
ssr : false ,
326
332
ssrManifest : false ,
333
+ ssrEmitAssets : false ,
327
334
reportCompressedSize : true ,
328
335
chunkSizeWarningLimit : 500 ,
329
336
watch : null ,
Original file line number Diff line number Diff line change @@ -187,7 +187,11 @@ export function assetPlugin(config: ResolvedConfig): Plugin {
187
187
188
188
generateBundle ( _ , bundle ) {
189
189
// do not emit assets for SSR build
190
- if ( config . command === 'build' && config . build . ssr ) {
190
+ if (
191
+ config . command === 'build' &&
192
+ config . build . ssr &&
193
+ ! config . build . ssrEmitAssets
194
+ ) {
191
195
for ( const file in bundle ) {
192
196
if (
193
197
bundle [ file ] . type === 'asset' &&
You can’t perform that action at this time.
0 commit comments