构建cjs/mjs

This commit is contained in:
YHH
2025-07-07 11:49:36 +08:00
parent 1da5040d60
commit bce4a26197
3 changed files with 14 additions and 15 deletions

View File

@@ -31,7 +31,7 @@ module.exports = [
{
input: 'bin/index.js',
output: {
file: 'dist/index.js',
file: 'dist/index.mjs',
format: 'es',
banner,
sourcemap: true,
@@ -53,13 +53,12 @@ module.exports = [
}
},
// UMD构建可选
// CommonJS构建
{
input: 'bin/index.js',
output: {
file: 'dist/index.umd.js',
format: 'umd',
name: 'ECSFramework',
file: 'dist/index.cjs',
format: 'cjs',
banner,
sourcemap: true,
exports: 'named'