文件操作 - check-if-layout-used.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/nuxt/dist/app/plugins/check-if-layout-used.js
编辑文件内容
import { nextTick } from "vue"; import { defineNuxtPlugin } from "../nuxt.js"; import { onNuxtReady } from "../composables/ready.js"; import { useError } from "../composables/error.js"; import layouts from "#build/layouts"; export default defineNuxtPlugin({ name: "nuxt:checkIfLayoutUsed", setup(nuxtApp) { const error = useError(); function checkIfLayoutUsed() { if (!error.value && !nuxtApp._isNuxtLayoutUsed && Object.keys(layouts).length > 0) { console.warn("[nuxt] Your project has layouts but the `<NuxtLayout />` component has not been used."); } } if (import.meta.server) { nuxtApp.hook("app:rendered", ({ renderResult }) => { if (renderResult?.html) { nextTick(checkIfLayoutUsed); } }); } else { onNuxtReady(checkIfLayoutUsed); } }, env: { islands: false } });
修改文件时间
将文件时间修改为当前时间的前一年
删除文件