Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
fix: 修复sjs or wxs 存在循环依赖时,编译卡死问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xsh committed Jun 7, 2022
1 parent e249eb3 commit aaae00b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/remax-cli/src/build/NativeAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default class NativeAssets {
const templateFile = replaceExtension(this.entry, template.extension);

const walkJsHelper = (filename: string) => {
if (!fs.existsSync(filename)) {
if (!fs.existsSync(filename) || this.assets.has(filename)) {
return;
}
const content = fs.readFileSync(filename);
Expand Down Expand Up @@ -77,7 +77,7 @@ export default class NativeAssets {
};

const walkTemplate = (filename: string) => {
if (!fs.existsSync(filename)) {
if (!fs.existsSync(filename) || this.assets.has(filename)) {
return;
}
const content = fs.readFileSync(filename);
Expand Down

0 comments on commit aaae00b

Please sign in to comment.