Skip to content

Commit

Permalink
fix: cannot reduce message-compiler bundle size for runtime (#1860)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed May 21, 2024
1 parent 99a08b4 commit 940dc83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/core-base/src/compilation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export function compile<
context: MessageCompilerContext
): MessageFunction<Message> {
if (
!__RUNTIME__ &&
(__ESM_BROWSER__ ||
__NODE_JS__ ||
__GLOBAL__ ||
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const fuzzyMatchTarget = async (

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

export async function readJson(path: string) {
Expand Down

0 comments on commit 940dc83

Please sign in to comment.