File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import {
27
27
loadFallbackPlugin as nativeLoadFallbackPlugin ,
28
28
manifestPlugin as nativeManifestPlugin ,
29
29
reporterPlugin as nativeReporterPlugin ,
30
+ webWorkerPostPlugin as nativeWebWorkerPostPlugin ,
30
31
} from 'rolldown/experimental'
31
32
import type { RollupCommonJSOptions } from 'dep-types/commonjs'
32
33
import type { RollupDynamicImportVarsOptions } from 'dep-types/dynamicImportVars'
@@ -494,7 +495,20 @@ export async function resolveBuildPlugins(config: ResolvedConfig): Promise<{
494
495
)
495
496
) . filter ( Boolean ) as Plugin [ ] ,
496
497
) ,
497
- ...( config . isWorker ? [ webWorkerPostPlugin ( ) ] : [ ] ) ,
498
+ ...( config . isWorker
499
+ ? [
500
+ enableNativePlugin === true
501
+ ? perEnvironmentPlugin (
502
+ 'native:web-worker-post-plugin' ,
503
+ ( environment ) => {
504
+ if ( environment . config . worker . format === 'iife' ) {
505
+ return nativeWebWorkerPostPlugin ( )
506
+ }
507
+ } ,
508
+ )
509
+ : webWorkerPostPlugin ( ) ,
510
+ ]
511
+ : [ ] ) ,
498
512
] ,
499
513
post : [
500
514
buildImportAnalysisPlugin ( config ) ,
You can’t perform that action at this time.
0 commit comments