diff --git a/docs/content/2.guide/2.features/13.modules.md b/docs/content/2.guide/2.features/13.modules.md index 737ccc12e1..1cf34db022 100644 --- a/docs/content/2.guide/2.features/13.modules.md +++ b/docs/content/2.guide/2.features/13.modules.md @@ -20,7 +20,7 @@ Once you have installed the modules you can then add them to your `nuxt.config.t ```ts{}[nuxt.config.ts] export default defineNuxtConfig({ modules: [ - // Using package name (recommanded usage) + // Using package name (recommended usage) '@nuxtjs/example', // Load a local module diff --git a/docs/content/2.guide/2.features/9.server-routes.md b/docs/content/2.guide/2.features/9.server-routes.md index dcad22233a..fbecf165db 100644 --- a/docs/content/2.guide/2.features/9.server-routes.md +++ b/docs/content/2.guide/2.features/9.server-routes.md @@ -196,7 +196,7 @@ export default (req, res) => { ``` ::alert{type=warning} -Legacy support is possible using [unjs/h3](https://github.com/unjs/h3) but it adviced to avoid legacy handlers as much as you can. +Legacy support is possible using [unjs/h3](https://github.com/unjs/h3) but it advised to avoid legacy handlers as much as you can. :: ```ts [/server/middleware/legacy.ts] diff --git a/docs/content/3.api/2.components/5.nuxt-error-boundary.md b/docs/content/3.api/2.components/5.nuxt-error-boundary.md index 57f37de7d0..7cbe43de04 100644 --- a/docs/content/3.api/2.components/5.nuxt-error-boundary.md +++ b/docs/content/3.api/2.components/5.nuxt-error-boundary.md @@ -23,7 +23,7 @@ Nuxt provides the `` component to handle client-side errors h diff --git a/docs/content/3.api/5.commands/init.md b/docs/content/3.api/5.commands/init.md index 9618de64c3..99feebb6ef 100644 --- a/docs/content/3.api/5.commands/init.md +++ b/docs/content/3.api/5.commands/init.md @@ -8,6 +8,6 @@ The `init` command initializes a fresh Nuxt project. Option | Default | Description -------------------------|-----------------|------------------ -`--verbose, -v` | `false` | Log informations about the installation process. +`--verbose, -v` | `false` | Log information about the installation process. `--template, -t` | `nuxt/starter#v3` | Specify a Git repository to use as a template. `dir` | `nuxt-app` | Name of the install directory. diff --git a/packages/kit/src/compatibility.ts b/packages/kit/src/compatibility.ts index e2f5f5a0b2..de41bcd68b 100644 --- a/packages/kit/src/compatibility.ts +++ b/packages/kit/src/compatibility.ts @@ -22,7 +22,7 @@ export async function checkNuxtCompatibility (constraints: NuxtCompatibility, nu // Bridge compatibility check if (isNuxt2(nuxt)) { - const bridgeRequirement = constraints?.bridge + const bridgeRequirement = constraints.bridge const hasBridge = !!(nuxt.options as any).bridge if (bridgeRequirement === true && !hasBridge) { issues.push({ @@ -86,7 +86,7 @@ export function isNuxt3 (nuxt: Nuxt = useNuxt()) { export function getNuxtVersion (nuxt: Nuxt | any = useNuxt() /* TODO: LegacyNuxt */) { const version = (nuxt?._version || nuxt?.version || nuxt?.constructor?.version || '').replace(/^v/g, '') if (!version) { - throw new Error('Cannot determine nuxt version! Is currect instance passed?') + throw new Error('Cannot determine nuxt version! Is current instance passed?') } return version } diff --git a/packages/kit/src/module/define.ts b/packages/kit/src/module/define.ts index 425da55236..2356bcf0cb 100644 --- a/packages/kit/src/module/define.ts +++ b/packages/kit/src/module/define.ts @@ -26,7 +26,7 @@ export function defineNuxtModule (definition: Mo // @ts-ignore TODO: Remove non-meta fallbacks in RC definition.meta.name = definition.meta.name || definition.name // @ts-ignore - definition.meta.configKey = definition.meta.configKey || definition.configKey || definition.meta.name + definition.meta.configKey = definition.configKey || definition.meta.name } // Resolves module options from inline options, [configKey] in nuxt.config, defaults and schema diff --git a/packages/nuxt/src/core/nuxt.ts b/packages/nuxt/src/core/nuxt.ts index 205336a74c..6cd04dfb5c 100644 --- a/packages/nuxt/src/core/nuxt.ts +++ b/packages/nuxt/src/core/nuxt.ts @@ -119,7 +119,7 @@ async function initNuxt (nuxt: Nuxt) { await nuxt.callHook('modules:done', { nuxt } as ModuleContainer) - await addModuleTranspiles() + addModuleTranspiles() // Init nitro await initNitro(nuxt) diff --git a/packages/vite/src/vite-node.ts b/packages/vite/src/vite-node.ts index d4d5985e38..6a855f16fd 100644 --- a/packages/vite/src/vite-node.ts +++ b/packages/vite/src/vite-node.ts @@ -50,8 +50,8 @@ function getManifest (server: ViteDevServer) { function createViteNodeMiddleware (ctx: ViteBuildContext) { const app = createApp() - app.use('/manifest', defineEventHandler(async () => { - const manifest = await getManifest(ctx.ssrServer) + app.use('/manifest', defineEventHandler(() => { + const manifest = getManifest(ctx.ssrServer) return manifest })) diff --git a/packages/webpack/src/utils/postcss.ts b/packages/webpack/src/utils/postcss.ts index ae8472cc64..b04566777c 100644 --- a/packages/webpack/src/utils/postcss.ts +++ b/packages/webpack/src/utils/postcss.ts @@ -60,7 +60,7 @@ export const getPostcssConfig = (nuxt: Nuxt) => { return false } - const configFile = nuxt.options.postcss?.config + const configFile = nuxt.options.postcss.config if (configFile) { return { postcssOptions: { diff --git a/packages/webpack/src/webpack.ts b/packages/webpack/src/webpack.ts index ab04e37aa6..07db13be6c 100644 --- a/packages/webpack/src/webpack.ts +++ b/packages/webpack/src/webpack.ts @@ -18,7 +18,7 @@ import { createWebpackConfigContext, applyPresets, getWebpackConfig } from './ut // const plugins: string[] = [] export async function bundle (nuxt: Nuxt) { - await registerVirtualModules() + registerVirtualModules() const webpackConfigs = [client, ...nuxt.options.ssr ? [server] : []].map((preset) => { const ctx = createWebpackConfigContext(nuxt)