Skip to content

Commit 658d867

Browse files
authored
refactor: use rollup dir and entryFileNames options instead of file (#674)
1 parent 1d60912 commit 658d867

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,10 @@ function createConfig(options, entry, format, writeMeta) {
559559
let cache;
560560
if (modern) cache = false;
561561

562+
const absMain = resolve(options.cwd, getMain({ options, entry, format }));
563+
const outputDir = dirname(absMain);
564+
const outputEntryFileName = basename(absMain);
565+
562566
let config = {
563567
/** @type {import('rollup').InputOptions} */
564568
inputOptions: {
@@ -750,7 +754,8 @@ function createConfig(options, entry, format, writeMeta) {
750754
},
751755
format: modern ? 'es' : format,
752756
name: options.name,
753-
file: resolve(options.cwd, getMain({ options, entry, format })),
757+
dir: outputDir,
758+
entryFileNames: outputEntryFileName,
754759
},
755760
};
756761

0 commit comments

Comments
 (0)