Skip to content

Commit 940dc83

Browse files
authored
fix: cannot reduce message-compiler bundle size for runtime (#1860)
1 parent 99a08b4 commit 940dc83

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/core-base/src/compilation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export function compile<
6060
context: MessageCompilerContext
6161
): MessageFunction<Message> {
6262
if (
63+
!__RUNTIME__ &&
6364
(__ESM_BROWSER__ ||
6465
__NODE_JS__ ||
6566
__GLOBAL__ ||

scripts/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const fuzzyMatchTarget = async (
5656

5757
export async function checkSizeDistFiles(target: string) {
5858
const dirs = await fs.readdir(`${target}/dist`)
59-
return dirs.filter(file => /prod.[cm]js$/.test(file))
59+
return dirs.filter(file => /prod.(cjs|js)$/.test(file))
6060
}
6161

6262
export async function readJson(path: string) {

0 commit comments

Comments
 (0)