打包支持nodejs模块
This commit is contained in:
@@ -44,13 +44,13 @@ function generatePackageJson() {
|
|||||||
name: sourcePackage.name,
|
name: sourcePackage.name,
|
||||||
version: sourcePackage.version,
|
version: sourcePackage.version,
|
||||||
description: sourcePackage.description,
|
description: sourcePackage.description,
|
||||||
main: 'index.js',
|
main: 'index.umd.js',
|
||||||
module: 'index.js',
|
module: 'index.js',
|
||||||
types: 'index.d.ts',
|
types: 'index.d.ts',
|
||||||
type: 'module',
|
|
||||||
exports: {
|
exports: {
|
||||||
'.': {
|
'.': {
|
||||||
import: './index.js',
|
import: './index.js',
|
||||||
|
require: './index.umd.js',
|
||||||
types: './index.d.ts'
|
types: './index.d.ts'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export function Serializable(config?: Partial<SnapshotConfig>) {
|
|||||||
*
|
*
|
||||||
* 用于配置组件的快照行为
|
* 用于配置组件的快照行为
|
||||||
*/
|
*/
|
||||||
export function SnapshotConfig(config: SnapshotConfig) {
|
export function SnapshotConfigDecorator(config: SnapshotConfig) {
|
||||||
return function (target: any) {
|
return function (target: any) {
|
||||||
target.prototype.snapshotConfig = config;
|
target.prototype.snapshotConfig = config;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,6 +14,6 @@ export { SnapshotManager } from './SnapshotManager';
|
|||||||
export {
|
export {
|
||||||
ISnapshotExtension,
|
ISnapshotExtension,
|
||||||
Serializable,
|
Serializable,
|
||||||
SnapshotConfig as SnapshotConfigDecorator,
|
SnapshotConfigDecorator,
|
||||||
SnapshotExtension
|
SnapshotExtension
|
||||||
} from './SnapshotExtension';
|
} from './SnapshotExtension';
|
||||||
@@ -18,4 +18,7 @@ export * from './ECS';
|
|||||||
|
|
||||||
// 工具类和类型定义
|
// 工具类和类型定义
|
||||||
export * from './Utils';
|
export * from './Utils';
|
||||||
export * from './Types';
|
export * from './Types';
|
||||||
|
|
||||||
|
// 快照系统(可选模块)
|
||||||
|
export * from './Utils/Snapshot';
|
||||||
Reference in New Issue
Block a user