@@ -670,20 +670,22 @@ export async function build(
670
670
// config.packageCache,
671
671
// )
672
672
// : path.posix.join(options.assetsDir, `[name]-[hash].${jsExt}`),
673
- entryFileNames : libOptions
674
- ? `[name]-[hash].${ jsExt } `
675
- : path . posix . join ( options . assetsDir , `[name]-[hash].${ jsExt } ` ) ,
673
+ entryFileNames : ssr
674
+ ? `[name].${ jsExt } `
675
+ : libOptions
676
+ ? `[name]-[hash].${ jsExt } `
677
+ : path . posix . join ( options . assetsDir , `[name]-[hash].${ jsExt } ` ) ,
676
678
chunkFileNames : libOptions
677
679
? `[name]-[hash].${ jsExt } `
678
680
: path . posix . join ( options . assetsDir , `[name]-[hash].${ jsExt } ` ) ,
679
681
assetFileNames : libOptions
680
682
? `[name].[ext]`
681
683
: path . posix . join ( options . assetsDir , `[name]-[hash].[ext]` ) ,
682
684
// inlineDynamicImports:
683
- // output.format === 'umd' ||
684
- // output.format === 'iife' ||
685
- // (ssrWorkerBuild &&
686
- // (typeof input === 'string' || Object.keys(input).length === 1)),
685
+ // output.format === 'umd' ||
686
+ // output.format === 'iife' ||
687
+ // (ssrWorkerBuild &&
688
+ // (typeof input === 'string' || Object.keys(input).length === 1)),
687
689
...output ,
688
690
}
689
691
}
@@ -844,7 +846,7 @@ function resolveOutputJsExtension(
844
846
type : string = 'commonjs' ,
845
847
) : JsExt {
846
848
if ( type === 'module' ) {
847
- return format === 'cjs' /* || format === 'umd' */ ? 'cjs' :'js'
849
+ return format === 'cjs' /* || format === 'umd' */ ? 'cjs' : 'js'
848
850
} else {
849
851
return format === 'es' ? 'mjs' : 'js'
850
852
}
@@ -894,7 +896,7 @@ export function resolveBuildOutputs(
894
896
Object . values ( libOptions . entry ) . length > 1
895
897
const libFormats =
896
898
libOptions . formats ||
897
- ( libHasMultipleEntries ? [ 'es' , 'cjs' ] : [ 'es' , /* 'umd' */ ] )
899
+ ( libHasMultipleEntries ? [ 'es' , 'cjs' ] : [ 'es' /* 'umd' */ ] )
898
900
899
901
if ( ! Array . isArray ( outputs ) ) {
900
902
// if (libFormats.includes('umd') || libFormats.includes('iife')) {
@@ -1236,7 +1238,7 @@ export function createToImportMetaURLBasedRelativeRuntime(
1236
1238
format : InternalModuleFormat ,
1237
1239
isWorker : boolean ,
1238
1240
) : ( filename : string , importer : string ) => { runtime : string } {
1239
- const formatLong = isWorker && format === 'iife' ? 'worker-iife' : format
1241
+ const formatLong = isWorker && format === 'iife' ? 'worker-iife' : format
1240
1242
const toRelativePath = customRelativeUrlMechanisms [ formatLong ]
1241
1243
return ( filename , importer ) => ( {
1242
1244
runtime : toRelativePath (
0 commit comments