File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,20 @@ export default defineNuxtConfig({
77 nuxt . options . pwa . pwaAssets . disabled = true
88 }
99 } ,
10+ // Workaround for Nuxt 4.3.0 regression: https://github.com/nuxt/nuxt/issues/34140
11+ // shared-imports.d.ts pulls in app composables during type-checking of shared context,
12+ // but the shared context doesn't have access to auto-import globals.
13+ // TODO: Remove when Nuxt fixes this upstream
14+ function ( _ , nuxt ) {
15+ nuxt . hook ( 'prepare:types' , ( { sharedReferences } ) => {
16+ const idx = sharedReferences . findIndex (
17+ ref => 'path' in ref && ref . path . endsWith ( 'shared-imports.d.ts' ) ,
18+ )
19+ if ( idx !== - 1 ) {
20+ sharedReferences . splice ( idx , 1 )
21+ }
22+ } )
23+ } ,
1024 '@unocss/nuxt' ,
1125 '@nuxtjs/html-validator' ,
1226 '@nuxt/scripts' ,
Original file line number Diff line number Diff line change 1+ import { createError } from 'h3'
12import validatePackageName from 'validate-npm-package-name'
23
34/**
You can’t perform that action at this time.
0 commit comments