Skip to content

Commit

Permalink
fix: Use config:resolved hook to update config instead of ready (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
aklinker1 authored Nov 15, 2024
1 parent 497c902 commit eb1ace6
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/module-react/modules/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default defineWxtModule<ReactModuleOptions>({
addImportPreset(wxt, 'react');

// Enable auto-imports for JSX files
wxt.hooks.hook('ready', (wxt) => {
wxt.hook('config:resolved', (wxt) => {
if (wxt.config.imports === false) return;

wxt.config.imports.dirsScanOptions ??= {};
Expand Down
2 changes: 1 addition & 1 deletion packages/module-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"prepare": "buildc --deps-only -- wxt prepare"
},
"peerDependencies": {
"wxt": ">=0.18.6"
"wxt": ">=0.19.16"
},
"dependencies": {
"@vitejs/plugin-react": "^4.3.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/module-solid/modules/solid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default defineWxtModule<SolidModuleOptions>({
addImportPreset(wxt, 'solid-js');

// Enable auto-imports for JSX files
wxt.hooks.hook('ready', (wxt) => {
wxt.hook('config:resolved', (wxt) => {
if (wxt.config.imports === false) return;

wxt.config.imports.dirsScanOptions ??= {};
Expand Down
2 changes: 1 addition & 1 deletion packages/module-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"prepare": "buildc --deps-only -- wxt prepare"
},
"peerDependencies": {
"wxt": ">=0.18.6"
"wxt": ">=0.19.16"
},
"dependencies": {
"vite-plugin-solid": "^2.10.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/module-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"check": "pnpm build && check"
},
"peerDependencies": {
"wxt": ">=0.18.6"
"wxt": ">=0.19.16"
},
"dependencies": {
"@vitejs/plugin-vue": "^5.2.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/module-vue/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default defineWxtModule<VueModuleOptions>({
}));

// Enable auto-imports in template files
wxt.hooks.hook('ready', (wxt) => {
wxt.hook('config:resolved', (wxt) => {
if (!wxt.config.imports) return;

wxt.config.imports.addons ??= {};
Expand Down

0 comments on commit eb1ace6

Please sign in to comment.