File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
packages/vite/src/plugins Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,13 @@ export function ModulePreloadPolyfillPlugin (): Plugin {
1212 name : 'nuxt:module-preload-polyfill' ,
1313 applyToEnvironment : environment => environment . name === 'client' ,
1414 configResolved ( config ) {
15- isDisabled = config . build . modulePreload === false || config . build . modulePreload . polyfill === false
16- sourcemap = ! ! config . build . sourcemap
17- entry = resolveClientEntry ( config )
15+ try {
16+ isDisabled = config . build . modulePreload === false || config . build . modulePreload . polyfill === false
17+ sourcemap = ! ! config . build . sourcemap
18+ entry = resolveClientEntry ( config )
19+ } catch {
20+ console . debug ( '[nuxt:module-preload-polyfill] Could not resolve client entry, module preload polyfill will not be injected.' )
21+ }
1822 } ,
1923 transform ( code , id ) {
2024 if ( isDisabled || id . replace ( QUERY_RE , '' ) !== entry ) { return }
Original file line number Diff line number Diff line change @@ -15,8 +15,12 @@ export function TypeCheckPlugin (nuxt: Nuxt): Plugin {
1515 return ! nuxt . options . test && nuxt . options . typescript . typeCheck === true
1616 } ,
1717 configResolved ( config ) {
18- entry = resolveClientEntry ( config )
19- sourcemap = ! ! config . build . sourcemap
18+ try {
19+ entry = resolveClientEntry ( config )
20+ sourcemap = ! ! config . build . sourcemap
21+ } catch {
22+ console . debug ( '[nuxt:type-check] Could not resolve client entry, type checking will not be applied.' )
23+ }
2024 } ,
2125 transform ( code , id ) {
2226 if ( id . replace ( QUERY_RE , '' ) !== entry ) { return }
You can’t perform that action at this time.
0 commit comments