chore: fix mixin and external mod (#1817)

* chore: fix mixin and external mod

* chore: add back to root

* chore: add systemjs build of stardust

* chore: trigger diff

* fix: remove typo import
This commit is contained in:
Tobias Åström
2025-10-02 18:55:27 +02:00
committed by GitHub
parent 3744c2ec69
commit d227626473
7 changed files with 56 additions and 30 deletions

View File

@@ -94,6 +94,7 @@ const config = ({ format = 'umd', debug = false, file, targetPkg }) => {
// peers that are not devDeps should be externals for full bundle
// const bundleExternals = peers.filter((p) => typeof (pkg.devDependencies || {})[p] === 'undefined');
const useDirectoryOutput = format === 'systemjs';
const external = peers;
const globals = {};
@@ -123,17 +124,28 @@ const config = ({ format = 'umd', debug = false, file, targetPkg }) => {
warn(warning);
},
input: path.resolve(cwd, 'src', 'index'),
output: {
// file: path.resolve(targetDir, getFileName(isEsm ? 'esm' : '', dev)),
file,
format,
exports: ['test-utils', 'stardust'].indexOf(targetName) !== -1 ? 'named' : 'default',
name: umdName,
sourcemap: true,
banner,
globals,
inlineDynamicImports: true,
},
output: useDirectoryOutput
? {
dir: path.dirname(file),
entryFileNames: path.basename(file),
chunkFileNames: 'chunks/[name]-[hash].js',
format,
exports: ['test-utils', 'stardust'].indexOf(targetName) !== -1 ? 'named' : 'default',
sourcemap: true,
banner,
globals,
inlineDynamicImports: false,
}
: {
file,
format,
exports: ['test-utils', 'stardust'].indexOf(targetName) !== -1 ? 'named' : 'default',
name: umdName,
sourcemap: true,
banner,
globals,
inlineDynamicImports: true,
},
external,
plugins: [
replace({
@@ -227,6 +239,23 @@ let dist = [
})
: false,
targetName === 'stardust'
? config({
format: 'systemjs',
targetPkg: pkg,
file: path.resolve(targetDir, getFileName('systemjs', false)),
})
: false,
targetName === 'stardust'
? config({
debug: true,
format: 'systemjs',
targetPkg: pkg,
file: path.resolve(targetDir, getFileName('systemjs', true)),
})
: false,
// core esm
corePkg && corePkg.module
? config({