Skip to content

Commit

Permalink
fix(devtools): resolve storage preset config file (#5885)
Browse files Browse the repository at this point in the history
  • Loading branch information
Asuka109 authored Jun 26, 2024
1 parent d1b5316 commit a5a4fe0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/poor-rings-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@modern-js/plugin-devtools': patch
---

fix(devtools): resolve storage preset config file
fix(devtools): 无法正确找到 storage preset 配置文件
2 changes: 1 addition & 1 deletion packages/devtools/plugin/src/plugins/watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { updateContext } from '../options';

export const pluginWatcher: Plugin = {
async setup(api) {
const basename = `${api.context.def.name.shortName}.runtime.json`;
const frameworkApi = await api.setupFramework();
const basename = `${api.context.def.name.shortName}.runtime.json`;
const appCtx = frameworkApi.useAppContext();
const watcher = chokidar.watch(getConfigFilenames(basename), {
cwd: appCtx.appDirectory,
Expand Down

0 comments on commit a5a4fe0

Please sign in to comment.