fix(nuxt,schema): remove .js extension from template imports

This commit is contained in:
Daniel Roe 2024-05-01 21:59:45 +01:00
parent 94a6f05812
commit 0d4a622f3a
No known key found for this signature in database
GPG Key ID: CBC814C393D93268
3 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ import type { Nuxt, NuxtOptions, RuntimeConfig } from 'nuxt/schema'
import { version as nuxtVersion } from '../../package.json' import { version as nuxtVersion } from '../../package.json'
import { distDir } from '../dirs' import { distDir } from '../dirs'
import { toArray } from '../utils' 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' import { ImportProtectionPlugin, nuxtImportProtections } from './plugins/import-protection'
const logLevelMapReverse = { const logLevelMapReverse = {

View File

@ -66,7 +66,7 @@ export default <NitroErrorHandler> async function errorhandler (error: H3Error,
// Fallback to static rendered error page // Fallback to static rendered error page
if (!res) { 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) { if (import.meta.dev) {
// TODO: Support `message` in template // TODO: Support `message` in template
(errorObject as any).description = errorObject.message (errorObject as any).description = errorObject.message

View File

@ -1,5 +1,5 @@
import { defineUntypedSchema } from 'untyped' import { defineUntypedSchema } from 'untyped'
import { template as loadingTemplate } from '../templates/loading.js' import { template as loadingTemplate } from '../templates/loading'
export default defineUntypedSchema({ export default defineUntypedSchema({
devServer: { devServer: {