From 0d4a622f3ad5eb2de91477f4149fe29b571dbe5d Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 1 May 2024 21:59:45 +0100 Subject: [PATCH] fix(nuxt,schema): remove `.js` extension from template imports --- packages/nuxt/src/core/nitro.ts | 2 +- packages/nuxt/src/core/runtime/nitro/error.ts | 2 +- packages/schema/src/config/dev.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nuxt/src/core/nitro.ts b/packages/nuxt/src/core/nitro.ts index a4952a45ed..6d534d693e 100644 --- a/packages/nuxt/src/core/nitro.ts +++ b/packages/nuxt/src/core/nitro.ts @@ -17,7 +17,7 @@ import type { Nuxt, NuxtOptions, RuntimeConfig } from 'nuxt/schema' import { version as nuxtVersion } from '../../package.json' import { distDir } from '../dirs' import { toArray } from '../utils' -import { template as defaultSpaLoadingTemplate } from './templates/spa-loading-icon.js' +import { template as defaultSpaLoadingTemplate } from './templates/spa-loading-icon' import { ImportProtectionPlugin, nuxtImportProtections } from './plugins/import-protection' const logLevelMapReverse = { diff --git a/packages/nuxt/src/core/runtime/nitro/error.ts b/packages/nuxt/src/core/runtime/nitro/error.ts index 4122e3e3cf..410fbd5457 100644 --- a/packages/nuxt/src/core/runtime/nitro/error.ts +++ b/packages/nuxt/src/core/runtime/nitro/error.ts @@ -66,7 +66,7 @@ export default async function errorhandler (error: H3Error, // Fallback to static rendered error page if (!res) { - const { template } = import.meta.dev ? await import('./error-dev.js') : await import('./error-500.js') + const { template } = import.meta.dev ? await import('./error-dev') : await import('./error-500') if (import.meta.dev) { // TODO: Support `message` in template (errorObject as any).description = errorObject.message diff --git a/packages/schema/src/config/dev.ts b/packages/schema/src/config/dev.ts index 00a7744eaf..9f58077cb8 100644 --- a/packages/schema/src/config/dev.ts +++ b/packages/schema/src/config/dev.ts @@ -1,5 +1,5 @@ import { defineUntypedSchema } from 'untyped' -import { template as loadingTemplate } from '../templates/loading.js' +import { template as loadingTemplate } from '../templates/loading' export default defineUntypedSchema({ devServer: {