File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ export default defineNuxtModule({
4141 throw new Error ( '[bridge] Bridge must be enabled by using `defineNuxtConfig` to wrap your Nuxt configuration.' )
4242 }
4343
44+ if ( opts . vite && ! opts . nitro && ! nuxt . options . dev ) {
45+ throw new Error ( '[bridge] Vite build will not work unless Nitro is enabled.' )
46+ }
47+
4448 if ( opts . nitro ) {
4549 nuxt . hook ( 'modules:done' , async ( ) => {
4650 await setupNitroBridge ( )
@@ -65,7 +69,7 @@ export default defineNuxtModule({
6569 // with webpack, we need to transpile vue to handle the default/named exports in Vue 2.7
6670 nuxt . options . build . transpile . push ( 'vue' )
6771 nuxt . hook ( 'build:done' , async ( ) => {
68- if ( ! nuxt . options . dev && ! nuxt . options . _prepare ) {
72+ if ( opts . nitro && ! nuxt . options . dev && ! nuxt . options . _prepare ) {
6973 await generateWebpackBuildManifest ( )
7074 }
7175 } )
You can’t perform that action at this time.
0 commit comments