diff --git a/modules/build-engine/src/engine-js/rollup-plugins/systemjs-named-register-plugin.ts b/modules/build-engine/src/engine-js/rollup-plugins/systemjs-named-register-plugin.ts index 2ff25d1..8c1d1c7 100644 --- a/modules/build-engine/src/engine-js/rollup-plugins/systemjs-named-register-plugin.ts +++ b/modules/build-engine/src/engine-js/rollup-plugins/systemjs-named-register-plugin.ts @@ -3,6 +3,7 @@ import babel = Transformer.core; import { rollup as Bundler } from '@ccbuild/bundler'; import rollup = Bundler.core; +import ps from 'path'; interface Options { name: string; @@ -33,6 +34,9 @@ function toNamedRegister( } function getChunkUrl(chunk: rollup.RenderedChunk): string { + if (ps.basename(chunk.fileName, '.js') === 'cc') { + return 'cc'; + } return `cocos-js/${chunk.fileName}`; } diff --git a/package-lock.json b/package-lock.json index a42c5b4..5bbe694 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@cocos/ccbuild", - "version": "2.2.8", + "version": "2.2.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@cocos/ccbuild", - "version": "2.2.8", + "version": "2.2.9", "hasInstallScript": true, "license": "MIT", "workspaces": [ diff --git a/package.json b/package.json index 33af6e2..5de5c88 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cocos/ccbuild", - "version": "2.2.8", + "version": "2.2.9", "description": "The next generation of build tool for Cocos engine.", "main": "./lib/index.js", "types": "./lib/index.d.ts",