mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-14 12:14:40 +01:00
log info about plugin installation
This commit is contained in:
@@ -5,6 +5,11 @@ export default defineNuxtConfig({
|
||||
modules: [Module],
|
||||
runtimeConfig: {
|
||||
baseURL: '',
|
||||
public: {
|
||||
trpc: {
|
||||
installPlugin: false
|
||||
}
|
||||
}
|
||||
},
|
||||
typescript: {
|
||||
strict: true,
|
||||
|
||||
@@ -60,7 +60,7 @@ export default defineNuxtModule<ModuleOptions>({
|
||||
},
|
||||
})
|
||||
|
||||
if (options.installPlugin) {
|
||||
if (finalConfig.installPlugin) {
|
||||
addImports([
|
||||
{ name: 'useClient', from: join(runtimeDir, 'client') },
|
||||
{ name: 'useAsyncQuery', from: join(runtimeDir, 'client') },
|
||||
@@ -72,6 +72,9 @@ export default defineNuxtModule<ModuleOptions>({
|
||||
|
||||
logger.success('Plugin successfully installed.')
|
||||
}
|
||||
else {
|
||||
logger.info('Plugin not installed. Create your own @trpc/client client plugin and composables.')
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user