generated from justintaddei/npm-ts-template
-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: nuxt3 typescript support in nuxt.config.ts
- Loading branch information
1 parent
be9743e
commit 9aa28ec
Showing
6 changed files
with
47 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { NuxtModule, ModuleOptions } from '@nuxt/schema'; | ||
|
||
interface VWaveModuleOptions extends ModuleOptions { | ||
randomProp: string; | ||
} | ||
declare const module: NuxtModule<VWaveModuleOptions>; | ||
|
||
declare module '@nuxt/schema' { | ||
interface NuxtConfig { ['vWave']?: NuxtModule<VWaveModuleOptions> } | ||
interface NuxtOptions { ['vWave']?: VWaveModuleOptions } | ||
} | ||
|
||
declare module 'nuxt/schema' { | ||
interface NuxtConfig { ['vWave']?: NuxtModule<VWaveModuleOptions> } | ||
interface NuxtOptions { ['vWave']?: VWaveModuleOptions } | ||
} | ||
|
||
export { VWaveModuleOptions, module as default }; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { defineNuxtModule, addPlugin, createResolver } from '@nuxt/kit' | ||
import type { IVWavePluginOptions } from '../src/options' | ||
|
||
type ModuleOptions = Partial<IVWavePluginOptions> | ||
|
||
export default defineNuxtModule<ModuleOptions>({ | ||
meta: { | ||
name: 'v-wave', | ||
configKey: 'vWave', | ||
compatibility: { | ||
nuxt: '^3.0.0', | ||
bridge: true | ||
} | ||
}, | ||
defaults: { | ||
directive: "wave" | ||
}, | ||
setup(options, nuxt) { | ||
const { resolve } = createResolver(import.meta.url) | ||
|
||
nuxt.options.runtimeConfig.public.vWave = options | ||
|
||
addPlugin(resolve('./runtime/plugin.ts')) | ||
} | ||
}) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters