mirror of
https://github.com/developit/microbundle.git
synced 2026-01-18 13:56:35 +00:00
refactor: use rollup dir and entryFileNames options instead of file (#674)
This commit is contained in:
parent
1d609126bf
commit
658d867900
@ -559,6 +559,10 @@ function createConfig(options, entry, format, writeMeta) {
|
||||
let cache;
|
||||
if (modern) cache = false;
|
||||
|
||||
const absMain = resolve(options.cwd, getMain({ options, entry, format }));
|
||||
const outputDir = dirname(absMain);
|
||||
const outputEntryFileName = basename(absMain);
|
||||
|
||||
let config = {
|
||||
/** @type {import('rollup').InputOptions} */
|
||||
inputOptions: {
|
||||
@ -750,7 +754,8 @@ function createConfig(options, entry, format, writeMeta) {
|
||||
},
|
||||
format: modern ? 'es' : format,
|
||||
name: options.name,
|
||||
file: resolve(options.cwd, getMain({ options, entry, format })),
|
||||
dir: outputDir,
|
||||
entryFileNames: outputEntryFileName,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user