Skip to content

Commit

Permalink
[v3.8.5] Uses cocos/rollup-plugin-terser to resolve that worker_threa…
Browse files Browse the repository at this point in the history
…ds could not be used in Electron render process. (#71)
  • Loading branch information
dumganhar authored Nov 7, 2024
1 parent 9cb4097 commit b43d039
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 202 deletions.
4 changes: 2 additions & 2 deletions .api/public.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14893,7 +14893,7 @@ declare module "@cocos/ccbuild" {
* @param options - Plugin options.
* @returns Plugin instance.
*/
export function terser(options?: __private.___node_modules_rollup_plugin_terser_types_index__Options): Plugin;
export function terser(options?: __private.___node_modules_cocos_rollup_plugin_terser_types_index__Options): Plugin;
/**
* Seamless integration between Rollup and Typescript.
*/
Expand Down Expand Up @@ -16974,7 +16974,7 @@ declare module "@cocos/ccbuild" {
sourceMap?: boolean | ___node_modules_terser_tools_terser__SourceMapOptions;
toplevel?: boolean;
}
export interface ___node_modules_rollup_plugin_terser_types_index__Options extends ___node_modules_terser_tools_terser__MinifyOptions {
export interface ___node_modules_cocos_rollup_plugin_terser_types_index__Options extends ___node_modules_terser_tools_terser__MinifyOptions {
nameCache?: Record<string, any>;
maxWorkers?: number;
}
Expand Down
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

2 changes: 1 addition & 1 deletion modules/build-engine/src/engine-js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ export async function buildJsEngine(options: Required<buildEngine.Options>): Pro
moduleSideEffects: (id: string): boolean => {
const relativePath = formatPath(ps.relative(engineRoot, id));
if (noSideEffectFiles.includes(relativePath)) {
console.info(`>>> Found no side-effect path: ${relativePath}`);
// console.info(`>>> Found no side-effect path: ${relativePath}`);
return false;
}
return true;
Expand Down
2 changes: 1 addition & 1 deletion modules/bundler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@cocos/rollup-plugin-node-resolve": "^15.3.0",
"@rollup/plugin-virtual": "^3.0.2",
"@rollup/plugin-typescript": "~11.1.6",
"@rollup/plugin-terser": "^0.4.4",
"@cocos/rollup-plugin-terser": "^0.4.4",
"fs-extra": "~11.1.1",
"glob": "~7.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion modules/bundler/src/rollup/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import json from '@rollup/plugin-json';
import nodeResolve from '@cocos/rollup-plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import virtual from '@rollup/plugin-virtual';
import terser from '@rollup/plugin-terser';
import terser from '@cocos/rollup-plugin-terser';
import typescript from '@rollup/plugin-typescript';
// import progress from 'rollup-plugin-progress';

Expand Down
Loading

0 comments on commit b43d039

Please sign in to comment.