1 parent 4aae8f0 commit fe897b2Copy full SHA for fe897b2
1 file changed
src/index.ts
@@ -457,12 +457,16 @@ export class Bundler {
457
typeof getFileName === 'function'
458
? getFileName({ format: rollupFormat, minify }, defaultFileName)
459
: getFileName
460
- const fileName = fileNameTemplate
+ let fileName = fileNameTemplate
461
.replace(/\[min\]/, minPlaceholder)
462
// The `[ext]` placeholder no longer makes sense
463
// Since we only output to `.js` now
464
// Probably remove it in the future
465
.replace(/\[ext\]/, '.js')
466
+
467
+ if (rollupFormat === 'esm') {
468
+ fileName = fileName.replace(/\[format\]/, 'esm')
469
+ }
470
471
return {
472
inputConfig: {
0 commit comments