diff --git a/DebugInfos.d.ts b/DebugInfos.json.d.ts similarity index 100% rename from DebugInfos.d.ts rename to DebugInfos.json.d.ts diff --git a/cocos/core/platform/debug.ts b/cocos/core/platform/debug.ts index 3d1af678ee..ab44047714 100644 --- a/cocos/core/platform/debug.ts +++ b/cocos/core/platform/debug.ts @@ -30,7 +30,7 @@ /* eslint-disable no-console */ import { EDITOR, JSB, DEV, DEBUG } from 'internal:constants'; -import debugInfos from '../../../DebugInfos'; +import debugInfos from '../../../DebugInfos.json'; import { legacyCC } from '../global-exports'; const ERROR_MAP_URL = 'https://github.com/cocos-creator/engine/blob/3d/EngineErrorMap.md'; diff --git a/cocos/particle-2d/particle-system-2d.ts b/cocos/particle-2d/particle-system-2d.ts index 2b542b13ae..865e779bcd 100644 --- a/cocos/particle-2d/particle-system-2d.ts +++ b/cocos/particle-2d/particle-system-2d.ts @@ -42,7 +42,7 @@ import { BlendFactor } from '../core/gfx'; import { path } from '../core/utils'; import { PNGReader } from './png-reader'; import { TiffReader } from './tiff-reader'; -import codec from '../../external/compression/ZipUtils'; +import codec from '../../external/compression/ZipUtils.js'; import { Batcher2D } from '../2d/renderer/batcher-2d'; import { assetManager } from '../core/asset-manager'; import { PositionType, EmitterMode, DURATION_INFINITY, START_RADIUS_EQUAL_TO_END_RADIUS, START_SIZE_EQUAL_TO_END_SIZE } from './define'; diff --git a/cocos/particle-2d/png-reader.ts b/cocos/particle-2d/png-reader.ts index 51d3624ffe..11bf623968 100644 --- a/cocos/particle-2d/png-reader.ts +++ b/cocos/particle-2d/png-reader.ts @@ -32,7 +32,7 @@ */ import { getError } from '../core/platform/debug'; -import zlib from '../../external/compression/zlib.min'; +import zlib from '../../external/compression/zlib.min.js'; /** * A png file reader diff --git a/cocos/primitive/primitive.ts b/cocos/primitive/primitive.ts index 4c41c3d7b8..950389a9eb 100644 --- a/cocos/primitive/primitive.ts +++ b/cocos/primitive/primitive.ts @@ -31,7 +31,7 @@ import { ccclass, type, serializable, editable } from 'cc.decorator'; import { createMesh } from '../3d/misc'; import { Mesh } from '../3d/assets/mesh'; -import * as primitives from '.'; +import * as primitives from './index'; import { ccenum } from '../core/value-types/enum'; import { legacyCC } from '../core/global-exports'; diff --git a/cocos/spine/index.ts b/cocos/spine/index.ts index 048f1455c8..c486571827 100644 --- a/cocos/spine/index.ts +++ b/cocos/spine/index.ts @@ -4,7 +4,7 @@ */ import { ccenum } from '../core'; -import spine from './lib/spine-core'; +import spine from './lib/spine-core.js'; /** * @en diff --git a/cocos/spine/lib/package.json b/cocos/spine/lib/package.json new file mode 100644 index 0000000000..bb34440a36 --- /dev/null +++ b/cocos/spine/lib/package.json @@ -0,0 +1 @@ +{ "type": "module" } \ No newline at end of file diff --git a/external/compression/ZipUtils.js b/external/compression/ZipUtils.js index 9325e4f31b..3a5530aecf 100644 --- a/external/compression/ZipUtils.js +++ b/external/compression/ZipUtils.js @@ -3,8 +3,8 @@ All rights reserved. You can choose between MIT and BSD-3-Clause license. License file will be added later. --*/ -import Base64 from './base64'; -import GZip from './gzip'; +import Base64 from './base64.js'; +import GZip from './gzip.js'; var codec = {name:'Jacob__Codec'}; codec.Base64 = Base64; diff --git a/external/compression/package.json b/external/compression/package.json new file mode 100644 index 0000000000..bb34440a36 --- /dev/null +++ b/external/compression/package.json @@ -0,0 +1 @@ +{ "type": "module" } \ No newline at end of file