Skip to content

Commit

Permalink
fix: add client data to dependencies (#4909)
Browse files Browse the repository at this point in the history
  • Loading branch information
yimingjfe authored Nov 3, 2023
1 parent fd51158 commit ce7d45c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/chilly-guests-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@modern-js/plugin-data-loader': patch
---

fix: add client data into dependencies
fix: 添加 client data 文件到 dependencies 中
2 changes: 2 additions & 0 deletions packages/cli/plugin-data-loader/src/cli/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export default async function loader(
? this.resourcePath.replace('.loader.', '.data.client.')
: this.resourcePath.replace('.data.', '.data.client.');

this.addDependency(clientDataPath);

const clientDataContent = await readFile(clientDataPath);
return clientDataContent;
} catch (error) {
Expand Down

0 comments on commit ce7d45c

Please sign in to comment.