Anthony Fu

Results 1228 comments of Anthony Fu

I think I understand the intention, but the current approach is a bit hacky to me. I guess for this, maybe we could have something built-in to support `onBeforeEnter` hooks...

Maybe we could throw an error to say it's not supported instead of silently ignoring it?

The problem we are trying to solve here is the support for "Hard restart", where the cache is explicitly not desired (e.g. upgrade Nuxt itself). This shouldn't be a common...

Oh, and I forgot to reference, Vitest has been using this pattern for months to capture Node crashes and handle the restart: https://github.com/vitest-dev/vitest/blob/4fc492c61d6e01bc34bc807a6b57197a1914f823/packages/vitest/src/node/cli-wrapper.ts#L134-L135 It works quite nicely and we don't...

By the discussion with @danielroe, I just pushed a commit to extend the `restart` hook to be: ```ts await nuxt.hooks.callHook('restart', { hard: true }) ``` Later, with the new CLI...

I think having options of unshift/push would be great!

For reference, @posva proposed a similar concept for Vue core: https://github.com/vuejs/core/pull/7451. I think we could align with the naming convention and maybe use it underneath later.

Just checked, it works with vite-node, with: ```ts export default defineNuxtConfig({ experimental: { viteNode: true } }) ``` However, even it works in the runtime, the warning is still thrown...

I was trying to find a reference from Vue's docs, but it seems they didn't mention this caveat at all. While searching online, I didn't find many articles talking about...

I honestly feel it's would be much better to just duplicate the file. This topic is essentially discussing how to do i18n to markdown files, which I think there isn't...