mirror of
https://github.com/developit/microbundle.git
synced 2026-01-18 13:56:35 +00:00
Merge branch 'master' into define-expression-replacement
This commit is contained in:
commit
e552ead847
@ -434,12 +434,15 @@ function createConfig(options, entry, format, writeMeta) {
|
||||
|
||||
let mainNoExtension = options.output;
|
||||
if (options.multipleEntries) {
|
||||
let name = entry.match(/([\\/])index(\.(umd|cjs|es|m))?\.m?js$/)
|
||||
let name = entry.match(/([\\/])index(\.(umd|cjs|es|m))?\.(mjs|[tj]sx?)$/)
|
||||
? mainNoExtension
|
||||
: entry;
|
||||
mainNoExtension = resolve(dirname(mainNoExtension), basename(name));
|
||||
}
|
||||
mainNoExtension = mainNoExtension.replace(/(\.(umd|cjs|es|m))?\.m?js$/, '');
|
||||
mainNoExtension = mainNoExtension.replace(
|
||||
/(\.(umd|cjs|es|m))?\.(mjs|[tj]sx?)$/,
|
||||
'',
|
||||
);
|
||||
|
||||
let moduleMain = replaceName(
|
||||
pkg.module && !pkg.module.match(/src\//)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user