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