更新库rollup配置
This commit is contained in:
6
package-lock.json
generated
6
package-lock.json
generated
@@ -11514,7 +11514,7 @@
|
|||||||
},
|
},
|
||||||
"packages/core": {
|
"packages/core": {
|
||||||
"name": "@esengine/ecs-framework",
|
"name": "@esengine/ecs-framework",
|
||||||
"version": "2.1.30",
|
"version": "2.1.31",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-commonjs": "^28.0.3",
|
"@rollup/plugin-commonjs": "^28.0.3",
|
||||||
@@ -11533,7 +11533,7 @@
|
|||||||
},
|
},
|
||||||
"packages/math": {
|
"packages/math": {
|
||||||
"name": "@esengine/ecs-framework-math",
|
"name": "@esengine/ecs-framework-math",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-commonjs": "^28.0.3",
|
"@rollup/plugin-commonjs": "^28.0.3",
|
||||||
@@ -11552,7 +11552,7 @@
|
|||||||
},
|
},
|
||||||
"packages/network": {
|
"packages/network": {
|
||||||
"name": "@esengine/ecs-framework-network",
|
"name": "@esengine/ecs-framework-network",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"isomorphic-ws": "^5.0.0",
|
"isomorphic-ws": "^5.0.0",
|
||||||
|
|||||||
@@ -31,7 +31,8 @@
|
|||||||
"test:ci": "lerna run test:ci",
|
"test:ci": "lerna run test:ci",
|
||||||
"prepare:publish": "npm run build:npm && node scripts/pre-publish-check.cjs",
|
"prepare:publish": "npm run build:npm && node scripts/pre-publish-check.cjs",
|
||||||
"sync:versions": "node scripts/sync-versions.cjs",
|
"sync:versions": "node scripts/sync-versions.cjs",
|
||||||
"publish:all": "npm run prepare:publish && lerna publish",
|
"publish:all": "npm run prepare:publish && npm run publish:all:dist",
|
||||||
|
"publish:all:dist": "npm run publish:core && npm run publish:math && npm run publish:network",
|
||||||
"publish:core": "cd packages/core && npm run publish:npm",
|
"publish:core": "cd packages/core && npm run publish:npm",
|
||||||
"publish:core:patch": "cd packages/core && npm run publish:patch",
|
"publish:core:patch": "cd packages/core && npm run publish:patch",
|
||||||
"publish:math": "cd packages/math && npm run publish:npm",
|
"publish:math": "cd packages/math && npm run publish:npm",
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ function generatePackageJson() {
|
|||||||
description: sourcePackage.description,
|
description: sourcePackage.description,
|
||||||
main: 'index.cjs',
|
main: 'index.cjs',
|
||||||
module: 'index.mjs',
|
module: 'index.mjs',
|
||||||
|
unpkg: 'index.umd.js',
|
||||||
types: 'index.d.ts',
|
types: 'index.d.ts',
|
||||||
exports: {
|
exports: {
|
||||||
'.': {
|
'.': {
|
||||||
@@ -59,6 +60,8 @@ function generatePackageJson() {
|
|||||||
'index.mjs.map',
|
'index.mjs.map',
|
||||||
'index.cjs',
|
'index.cjs',
|
||||||
'index.cjs.map',
|
'index.cjs.map',
|
||||||
|
'index.umd.js',
|
||||||
|
'index.umd.js.map',
|
||||||
'index.d.ts',
|
'index.d.ts',
|
||||||
'README.md',
|
'README.md',
|
||||||
'LICENSE',
|
'LICENSE',
|
||||||
@@ -110,7 +113,7 @@ function copyFiles() {
|
|||||||
|
|
||||||
function showBuildResults() {
|
function showBuildResults() {
|
||||||
const distDir = './dist';
|
const distDir = './dist';
|
||||||
const files = ['index.mjs', 'index.cjs', 'index.d.ts'];
|
const files = ['index.mjs', 'index.cjs', 'index.umd.js', 'index.d.ts'];
|
||||||
|
|
||||||
console.log('\n📊 构建结果:');
|
console.log('\n📊 构建结果:');
|
||||||
files.forEach(file => {
|
files.forEach(file => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@esengine/ecs-framework",
|
"name": "@esengine/ecs-framework",
|
||||||
"version": "2.1.30",
|
"version": "2.1.31",
|
||||||
"description": "用于Laya、Cocos Creator等JavaScript游戏引擎的高性能ECS框架",
|
"description": "用于Laya、Cocos Creator等JavaScript游戏引擎的高性能ECS框架",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "bin/index.js",
|
"main": "bin/index.js",
|
||||||
|
|||||||
@@ -77,6 +77,31 @@ module.exports = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// UMD构建 - 用于CDN和浏览器直接使用
|
||||||
|
{
|
||||||
|
input: 'bin/index.js',
|
||||||
|
output: {
|
||||||
|
file: 'dist/index.umd.js',
|
||||||
|
format: 'umd',
|
||||||
|
name: 'ECS',
|
||||||
|
banner,
|
||||||
|
sourcemap: true,
|
||||||
|
exports: 'named'
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
...commonPlugins,
|
||||||
|
terser({
|
||||||
|
format: {
|
||||||
|
comments: /^!/
|
||||||
|
}
|
||||||
|
})
|
||||||
|
],
|
||||||
|
external: [],
|
||||||
|
treeshake: {
|
||||||
|
moduleSideEffects: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// 类型定义构建
|
// 类型定义构建
|
||||||
{
|
{
|
||||||
input: 'bin/index.d.ts',
|
input: 'bin/index.d.ts',
|
||||||
|
|||||||
@@ -1,48 +1,125 @@
|
|||||||
const { execSync } = require('child_process');
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const { execSync } = require('child_process');
|
||||||
|
|
||||||
console.log('开始构建 @esengine/ecs-framework-math...');
|
console.log('🚀 使用 Rollup 构建 @esengine/ecs-framework-math npm包...');
|
||||||
|
|
||||||
|
async function main() {
|
||||||
try {
|
try {
|
||||||
// 检查bin目录是否存在
|
// 清理旧的dist目录
|
||||||
if (!fs.existsSync('bin')) {
|
if (fs.existsSync('./dist')) {
|
||||||
console.error('错误: bin目录不存在,请先运行 npm run build');
|
console.log('🧹 清理旧的构建文件...');
|
||||||
process.exit(1);
|
execSync('rimraf ./dist', { stdio: 'inherit' });
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建dist目录
|
// 执行Rollup构建
|
||||||
if (!fs.existsSync('dist')) {
|
console.log('📦 执行 Rollup 构建...');
|
||||||
fs.mkdirSync('dist');
|
execSync('rollup -c rollup.config.cjs', { stdio: 'inherit' });
|
||||||
}
|
|
||||||
|
|
||||||
// 运行rollup构建
|
// 生成package.json
|
||||||
execSync('npx rollup -c rollup.config.cjs', { stdio: 'inherit' });
|
console.log('📋 生成 package.json...');
|
||||||
|
generatePackageJson();
|
||||||
|
|
||||||
// 复制package.json到dist
|
// 复制其他文件
|
||||||
const pkg = require('./package.json');
|
console.log('📁 复制必要文件...');
|
||||||
const distPkg = {
|
copyFiles();
|
||||||
...pkg,
|
|
||||||
main: 'index.cjs.js',
|
|
||||||
module: 'index.esm.js',
|
|
||||||
types: 'index.d.ts',
|
|
||||||
scripts: undefined,
|
|
||||||
devDependencies: undefined
|
|
||||||
};
|
|
||||||
|
|
||||||
fs.writeFileSync(
|
// 输出构建结果
|
||||||
path.join('dist', 'package.json'),
|
showBuildResults();
|
||||||
JSON.stringify(distPkg, null, 2)
|
|
||||||
);
|
|
||||||
|
|
||||||
// 复制README(如果存在)
|
console.log('✅ 构建完成!');
|
||||||
if (fs.existsSync('README.md')) {
|
console.log('\n🚀 发布命令:');
|
||||||
fs.copyFileSync('README.md', path.join('dist', 'README.md'));
|
console.log('cd dist && npm publish');
|
||||||
}
|
|
||||||
|
|
||||||
console.log('✓ @esengine/ecs-framework-math 构建完成');
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('构建失败:', error.message);
|
console.error('❌ 构建失败:', error.message);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function generatePackageJson() {
|
||||||
|
const sourcePackage = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
|
||||||
|
|
||||||
|
const distPackage = {
|
||||||
|
name: sourcePackage.name,
|
||||||
|
version: sourcePackage.version,
|
||||||
|
description: sourcePackage.description,
|
||||||
|
main: 'index.cjs',
|
||||||
|
module: 'index.mjs',
|
||||||
|
unpkg: 'index.umd.js',
|
||||||
|
types: 'index.d.ts',
|
||||||
|
exports: {
|
||||||
|
'.': {
|
||||||
|
import: './index.mjs',
|
||||||
|
require: './index.cjs',
|
||||||
|
types: './index.d.ts'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
files: [
|
||||||
|
'index.mjs',
|
||||||
|
'index.mjs.map',
|
||||||
|
'index.cjs',
|
||||||
|
'index.cjs.map',
|
||||||
|
'index.umd.js',
|
||||||
|
'index.umd.js.map',
|
||||||
|
'index.d.ts',
|
||||||
|
'README.md',
|
||||||
|
'LICENSE'
|
||||||
|
],
|
||||||
|
keywords: [
|
||||||
|
'ecs',
|
||||||
|
'math',
|
||||||
|
'2d',
|
||||||
|
'vector',
|
||||||
|
'matrix',
|
||||||
|
'geometry',
|
||||||
|
'collision',
|
||||||
|
'game-engine',
|
||||||
|
'typescript',
|
||||||
|
'rollup'
|
||||||
|
],
|
||||||
|
author: sourcePackage.author,
|
||||||
|
license: sourcePackage.license,
|
||||||
|
repository: sourcePackage.repository,
|
||||||
|
bugs: sourcePackage.bugs,
|
||||||
|
homepage: sourcePackage.homepage,
|
||||||
|
engines: {
|
||||||
|
node: '>=16.0.0'
|
||||||
|
},
|
||||||
|
sideEffects: false
|
||||||
|
};
|
||||||
|
|
||||||
|
fs.writeFileSync('./dist/package.json', JSON.stringify(distPackage, null, 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
function copyFiles() {
|
||||||
|
const filesToCopy = [
|
||||||
|
{ src: './README.md', dest: './dist/README.md' },
|
||||||
|
{ src: './LICENSE', dest: './dist/LICENSE' }
|
||||||
|
];
|
||||||
|
|
||||||
|
filesToCopy.forEach(({ src, dest }) => {
|
||||||
|
if (fs.existsSync(src)) {
|
||||||
|
fs.copyFileSync(src, dest);
|
||||||
|
console.log(` ✓ 复制: ${path.basename(dest)}`);
|
||||||
|
} else {
|
||||||
|
console.log(` ⚠️ 文件不存在: ${src}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function showBuildResults() {
|
||||||
|
const distDir = './dist';
|
||||||
|
const files = ['index.mjs', 'index.cjs', 'index.umd.js', 'index.d.ts'];
|
||||||
|
|
||||||
|
console.log('\n📊 构建结果:');
|
||||||
|
files.forEach(file => {
|
||||||
|
const filePath = path.join(distDir, file);
|
||||||
|
if (fs.existsSync(filePath)) {
|
||||||
|
const size = fs.statSync(filePath).size;
|
||||||
|
console.log(` ${file}: ${(size / 1024).toFixed(1)}KB`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(console.error);
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@esengine/ecs-framework-math",
|
"name": "@esengine/ecs-framework-math",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"description": "ECS框架2D数学库 - 提供向量、矩阵、几何形状和碰撞检测功能",
|
"description": "ECS框架2D数学库 - 提供向量、矩阵、几何形状和碰撞检测功能",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "bin/index.js",
|
"main": "bin/index.js",
|
||||||
|
|||||||
@@ -1,52 +1,123 @@
|
|||||||
const { nodeResolve } = require('@rollup/plugin-node-resolve');
|
const resolve = require('@rollup/plugin-node-resolve');
|
||||||
const commonjs = require('@rollup/plugin-commonjs');
|
const commonjs = require('@rollup/plugin-commonjs');
|
||||||
const terser = require('@rollup/plugin-terser');
|
const terser = require('@rollup/plugin-terser');
|
||||||
const dts = require('rollup-plugin-dts').default;
|
const dts = require('rollup-plugin-dts').default;
|
||||||
|
const { readFileSync } = require('fs');
|
||||||
|
|
||||||
const pkg = require('./package.json');
|
const pkg = JSON.parse(readFileSync('./package.json', 'utf8'));
|
||||||
|
|
||||||
|
const banner = `/**
|
||||||
|
* @esengine/ecs-framework-math v${pkg.version}
|
||||||
|
* ECS框架2D数学库 - 提供向量、矩阵、几何形状和碰撞检测功能
|
||||||
|
*
|
||||||
|
* @author ${pkg.author}
|
||||||
|
* @license ${pkg.license}
|
||||||
|
*/`;
|
||||||
|
|
||||||
const input = 'bin/index.js';
|
|
||||||
const external = Object.keys(pkg.dependencies || {}).concat(Object.keys(pkg.peerDependencies || {}));
|
const external = Object.keys(pkg.dependencies || {}).concat(Object.keys(pkg.peerDependencies || {}));
|
||||||
|
|
||||||
|
const commonPlugins = [
|
||||||
|
resolve({
|
||||||
|
browser: true,
|
||||||
|
preferBuiltins: false
|
||||||
|
}),
|
||||||
|
commonjs({
|
||||||
|
include: /node_modules/
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
module.exports = [
|
module.exports = [
|
||||||
// ES Module build
|
// ES模块构建
|
||||||
{
|
{
|
||||||
input,
|
input: 'bin/index.js',
|
||||||
output: {
|
output: {
|
||||||
file: 'dist/index.esm.js',
|
file: 'dist/index.mjs',
|
||||||
format: 'esm',
|
format: 'es',
|
||||||
sourcemap: true
|
banner,
|
||||||
},
|
|
||||||
external,
|
|
||||||
plugins: [
|
|
||||||
nodeResolve(),
|
|
||||||
commonjs(),
|
|
||||||
terser()
|
|
||||||
]
|
|
||||||
},
|
|
||||||
// CommonJS build
|
|
||||||
{
|
|
||||||
input,
|
|
||||||
output: {
|
|
||||||
file: 'dist/index.cjs.js',
|
|
||||||
format: 'cjs',
|
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
exports: 'named'
|
exports: 'named'
|
||||||
},
|
},
|
||||||
external,
|
|
||||||
plugins: [
|
plugins: [
|
||||||
nodeResolve(),
|
...commonPlugins,
|
||||||
commonjs(),
|
terser({
|
||||||
terser()
|
format: {
|
||||||
]
|
comments: /^!/
|
||||||
|
}
|
||||||
|
})
|
||||||
|
],
|
||||||
|
external,
|
||||||
|
treeshake: {
|
||||||
|
moduleSideEffects: false,
|
||||||
|
propertyReadSideEffects: false,
|
||||||
|
unknownGlobalSideEffects: false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// TypeScript declarations
|
|
||||||
|
// CommonJS构建
|
||||||
|
{
|
||||||
|
input: 'bin/index.js',
|
||||||
|
output: {
|
||||||
|
file: 'dist/index.cjs',
|
||||||
|
format: 'cjs',
|
||||||
|
banner,
|
||||||
|
sourcemap: true,
|
||||||
|
exports: 'named'
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
...commonPlugins,
|
||||||
|
terser({
|
||||||
|
format: {
|
||||||
|
comments: /^!/
|
||||||
|
}
|
||||||
|
})
|
||||||
|
],
|
||||||
|
external,
|
||||||
|
treeshake: {
|
||||||
|
moduleSideEffects: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// UMD构建
|
||||||
|
{
|
||||||
|
input: 'bin/index.js',
|
||||||
|
output: {
|
||||||
|
file: 'dist/index.umd.js',
|
||||||
|
format: 'umd',
|
||||||
|
name: 'ECSMath',
|
||||||
|
banner,
|
||||||
|
sourcemap: true,
|
||||||
|
exports: 'named'
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
...commonPlugins,
|
||||||
|
terser({
|
||||||
|
format: {
|
||||||
|
comments: /^!/
|
||||||
|
}
|
||||||
|
})
|
||||||
|
],
|
||||||
|
external: [],
|
||||||
|
treeshake: {
|
||||||
|
moduleSideEffects: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 类型定义构建
|
||||||
{
|
{
|
||||||
input: 'bin/index.d.ts',
|
input: 'bin/index.d.ts',
|
||||||
output: {
|
output: {
|
||||||
file: 'dist/index.d.ts',
|
file: 'dist/index.d.ts',
|
||||||
format: 'esm'
|
format: 'es',
|
||||||
|
banner: `/**
|
||||||
|
* @esengine/ecs-framework-math v${pkg.version}
|
||||||
|
* TypeScript definitions
|
||||||
|
*/`
|
||||||
},
|
},
|
||||||
plugins: [dts()]
|
plugins: [
|
||||||
|
dts({
|
||||||
|
respectExternal: true
|
||||||
|
})
|
||||||
|
],
|
||||||
|
external: []
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -46,6 +46,7 @@ function generatePackageJson() {
|
|||||||
description: sourcePackage.description,
|
description: sourcePackage.description,
|
||||||
main: 'index.cjs',
|
main: 'index.cjs',
|
||||||
module: 'index.mjs',
|
module: 'index.mjs',
|
||||||
|
unpkg: 'index.umd.js',
|
||||||
types: 'index.d.ts',
|
types: 'index.d.ts',
|
||||||
exports: {
|
exports: {
|
||||||
'.': {
|
'.': {
|
||||||
@@ -59,6 +60,8 @@ function generatePackageJson() {
|
|||||||
'index.mjs.map',
|
'index.mjs.map',
|
||||||
'index.cjs',
|
'index.cjs',
|
||||||
'index.cjs.map',
|
'index.cjs.map',
|
||||||
|
'index.umd.js',
|
||||||
|
'index.umd.js.map',
|
||||||
'index.d.ts',
|
'index.d.ts',
|
||||||
'README.md',
|
'README.md',
|
||||||
'LICENSE'
|
'LICENSE'
|
||||||
@@ -67,7 +70,7 @@ function generatePackageJson() {
|
|||||||
'ecs',
|
'ecs',
|
||||||
'networking',
|
'networking',
|
||||||
'frame-sync',
|
'frame-sync',
|
||||||
'protobuf',
|
'tsrpc',
|
||||||
'serialization',
|
'serialization',
|
||||||
'multiplayer',
|
'multiplayer',
|
||||||
'game-engine',
|
'game-engine',
|
||||||
@@ -77,14 +80,13 @@ function generatePackageJson() {
|
|||||||
author: sourcePackage.author,
|
author: sourcePackage.author,
|
||||||
license: sourcePackage.license,
|
license: sourcePackage.license,
|
||||||
repository: sourcePackage.repository,
|
repository: sourcePackage.repository,
|
||||||
|
bugs: sourcePackage.bugs,
|
||||||
|
homepage: sourcePackage.homepage,
|
||||||
engines: {
|
engines: {
|
||||||
node: '>=16.0.0'
|
node: '>=16.0.0'
|
||||||
},
|
},
|
||||||
dependencies: {
|
dependencies: sourcePackage.dependencies,
|
||||||
'@esengine/ecs-framework': sourcePackage.peerDependencies['@esengine/ecs-framework'],
|
peerDependencies: sourcePackage.peerDependencies,
|
||||||
'protobufjs': sourcePackage.dependencies.protobufjs,
|
|
||||||
'reflect-metadata': sourcePackage.dependencies['reflect-metadata']
|
|
||||||
},
|
|
||||||
sideEffects: false
|
sideEffects: false
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -109,7 +111,7 @@ function copyFiles() {
|
|||||||
|
|
||||||
function showBuildResults() {
|
function showBuildResults() {
|
||||||
const distDir = './dist';
|
const distDir = './dist';
|
||||||
const files = ['index.mjs', 'index.cjs', 'index.d.ts'];
|
const files = ['index.mjs', 'index.cjs', 'index.umd.js', 'index.d.ts'];
|
||||||
|
|
||||||
console.log('\n📊 构建结果:');
|
console.log('\n📊 构建结果:');
|
||||||
files.forEach(file => {
|
files.forEach(file => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@esengine/ecs-framework-network",
|
"name": "@esengine/ecs-framework-network",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "ECS框架网络插件 - 提供TSRPC网络通信、帧同步和快照功能",
|
"description": "ECS框架网络插件 - 提供TSRPC网络通信、帧同步和快照功能",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "bin/index.js",
|
"main": "bin/index.js",
|
||||||
|
|||||||
@@ -82,6 +82,36 @@ module.exports = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// UMD构建 - 用于CDN和浏览器直接使用
|
||||||
|
{
|
||||||
|
input: 'bin/index.js',
|
||||||
|
output: {
|
||||||
|
file: 'dist/index.umd.js',
|
||||||
|
format: 'umd',
|
||||||
|
name: 'ECSNetwork',
|
||||||
|
banner,
|
||||||
|
sourcemap: true,
|
||||||
|
exports: 'named',
|
||||||
|
globals: {
|
||||||
|
'@esengine/ecs-framework': 'ECS',
|
||||||
|
'protobufjs': 'protobuf',
|
||||||
|
'reflect-metadata': 'Reflect'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
...commonPlugins,
|
||||||
|
terser({
|
||||||
|
format: {
|
||||||
|
comments: /^!/
|
||||||
|
}
|
||||||
|
})
|
||||||
|
],
|
||||||
|
external: ['@esengine/ecs-framework', 'protobufjs', 'reflect-metadata'],
|
||||||
|
treeshake: {
|
||||||
|
moduleSideEffects: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// 类型定义构建
|
// 类型定义构建
|
||||||
{
|
{
|
||||||
input: 'bin/index.d.ts',
|
input: 'bin/index.d.ts',
|
||||||
|
|||||||
Reference in New Issue
Block a user