mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-16 21:58:19 +00:00
fix(nuxt): add appManifest
middleware after modules run (#24786)
This commit is contained in:
parent
40a5f44942
commit
6f3cf42c9e
@ -94,16 +94,6 @@ async function initNuxt (nuxt: Nuxt) {
|
|||||||
addVitePlugin(() => ImportProtectionPlugin.vite(config))
|
addVitePlugin(() => ImportProtectionPlugin.vite(config))
|
||||||
addWebpackPlugin(() => ImportProtectionPlugin.webpack(config))
|
addWebpackPlugin(() => ImportProtectionPlugin.webpack(config))
|
||||||
|
|
||||||
if (nuxt.options.experimental.appManifest) {
|
|
||||||
addRouteMiddleware({
|
|
||||||
name: 'manifest-route-rule',
|
|
||||||
path: resolve(nuxt.options.appDir, 'middleware/manifest-route-rule'),
|
|
||||||
global: true
|
|
||||||
})
|
|
||||||
|
|
||||||
addPlugin(resolve(nuxt.options.appDir, 'plugins/check-outdated-build.client'))
|
|
||||||
}
|
|
||||||
|
|
||||||
// add resolver for modules used in virtual files
|
// add resolver for modules used in virtual files
|
||||||
addVitePlugin(() => resolveDeepImportsPlugin(nuxt))
|
addVitePlugin(() => resolveDeepImportsPlugin(nuxt))
|
||||||
|
|
||||||
@ -401,6 +391,16 @@ async function initNuxt (nuxt: Nuxt) {
|
|||||||
|
|
||||||
await nuxt.callHook('modules:done')
|
await nuxt.callHook('modules:done')
|
||||||
|
|
||||||
|
if (nuxt.options.experimental.appManifest) {
|
||||||
|
addRouteMiddleware({
|
||||||
|
name: 'manifest-route-rule',
|
||||||
|
path: resolve(nuxt.options.appDir, 'middleware/manifest-route-rule'),
|
||||||
|
global: true
|
||||||
|
})
|
||||||
|
|
||||||
|
addPlugin(resolve(nuxt.options.appDir, 'plugins/check-outdated-build.client'))
|
||||||
|
}
|
||||||
|
|
||||||
nuxt.hooks.hook('builder:watch', (event, relativePath) => {
|
nuxt.hooks.hook('builder:watch', (event, relativePath) => {
|
||||||
const path = resolve(nuxt.options.srcDir, relativePath)
|
const path = resolve(nuxt.options.srcDir, relativePath)
|
||||||
// Local module patterns
|
// Local module patterns
|
||||||
|
Loading…
Reference in New Issue
Block a user