Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adopt forward-compatible approach to builder:watch #102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/form-actions-nuxt/src/module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { existsSync, promises as fsp } from "node:fs"
import { dirname, resolve as pathResolve } from "node:path"
import { relative, dirname, resolve as pathResolve } from "node:path"
import { addImports, addPlugin, addTemplate, addTypeTemplate, createResolver, defineNuxtModule, updateTemplates, useLogger, useNitro } from "@nuxt/kit"
import { generateCode, loadFile } from "magicast"
import { pascalCase } from "scule"
Expand Down Expand Up @@ -226,6 +226,7 @@ export default defineNuxtModule({

// On watch, add new actions, extract loaders and add loaders.
nuxt.hook("builder:watch", async (event, path) => {
path = relative(nuxt.options.srcDir, pathResolve(nuxt.options.srcDir, path))
try {
await addHandlers(path, event)
}
Expand Down
Loading