Skip to content

Commit

Permalink
Update version and api
Browse files Browse the repository at this point in the history
  • Loading branch information
dumganhar committed Sep 24, 2024
1 parent 60909b0 commit 41c1225
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
17 changes: 17 additions & 0 deletions .api/public.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@ declare module "@cocos/ccbuild" {
*/
function enumerateAllDependents(meta: buildEngine.Result, featureUnits: string[]): string[];
export type ModuleFormat = "esm" | "cjs" | "system" | "iife";
export type HasModuleSideEffects = (id: string, external: boolean) => boolean;
export type ModuleSideEffectsOption = boolean | "no-external" | string[] | HasModuleSideEffects;
export type TreeshakingPreset = "smallest" | "safest" | "recommended";
export interface NormalizedTreeshakingOptions {
annotations: boolean;
correctVarValueBeforeDeclaration: boolean;
manualPureFunctions: readonly string[];
moduleSideEffects: HasModuleSideEffects;
propertyReadSideEffects: boolean | "always";
tryCatchDeoptimization: boolean;
unknownGlobalSideEffects: boolean;
}
export interface TreeshakingOptions extends Partial<Omit<NormalizedTreeshakingOptions, "moduleSideEffects">> {
moduleSideEffects?: ModuleSideEffectsOption;
preset?: TreeshakingPreset;
}
export interface Options {
/**
* 引擎仓库目录。
Expand Down Expand Up @@ -162,6 +178,7 @@ declare module "@cocos/ccbuild" {
* @note It's only avaiable when options.moduleFormat is 'system'.
*/
enableNamedRegisterForSystemJSModuleFormat?: boolean;
treeshake?: TreeshakingOptions;
}
export interface Result {
/**
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cocos/ccbuild",
"version": "2.2.12",
"version": "2.2.13",
"description": "The next generation of build tool for Cocos engine.",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
Expand Down

0 comments on commit 41c1225

Please sign in to comment.