File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -378,7 +378,7 @@ export async function loadOptions(
378
378
// Export conditions
379
379
options . exportConditions = _resolveExportConditions (
380
380
options . exportConditions ,
381
- { dev : options . dev , node : options . node }
381
+ { dev : options . dev , node : options . node , wasm : options . experimental . wasm }
382
382
) ;
383
383
384
384
// Add open-api endpoint
@@ -524,7 +524,7 @@ export function normalizeRouteRules(
524
524
525
525
function _resolveExportConditions (
526
526
conditions : string [ ] = [ ] ,
527
- opts : { dev : boolean ; node : boolean }
527
+ opts : { dev : boolean ; node : boolean ; wasm : boolean }
528
528
) {
529
529
const resolvedConditions : string [ ] = [ ] ;
530
530
@@ -553,7 +553,12 @@ function _resolveExportConditions(
553
553
) ;
554
554
}
555
555
556
- // 4. Add default conditions
556
+ // 4. Add unwasm conditions
557
+ if ( opts . wasm ) {
558
+ resolvedConditions . push ( "wasm" , "unwasm" ) ;
559
+ }
560
+
561
+ // 5. Add default conditions
557
562
resolvedConditions . push ( "import" , "default" ) ;
558
563
559
564
// Dedup with preserving order
You can’t perform that action at this time.
0 commit comments