Skip to content

Commit bcf6b77

Browse files
authored
chore: restructure module (#133)
1 parent 5a0d4ac commit bcf6b77

File tree

10 files changed

+7
-7
lines changed

10 files changed

+7
-7
lines changed

src/module.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ export default defineNuxtModule<ModuleOptions>({
2323
const resolver = createResolver(import.meta.url)
2424

2525
// performances
26-
addPlugin(resolver.resolve('./runtime/plugins/web-vitals/plugin.client'))
26+
addPlugin(resolver.resolve('./runtime/web-vitals/plugin.client'))
2727

2828
// hydration
29-
addPlugin(resolver.resolve('./runtime/plugins/hydration/plugin.client'))
29+
addPlugin(resolver.resolve('./runtime/hydration/plugin.client'))
3030
addBuildPlugin(InjectHydrationPlugin)
3131
addComponent({
3232
name: 'NuxtIsland',
33-
filePath: resolver.resolve('./runtime/components/nuxt-island'),
33+
filePath: resolver.resolve('./runtime/core/components/nuxt-island'),
3434
priority: 1000,
3535
})
3636

3737
// third-party scripts
38-
addPlugin(resolver.resolve('./runtime/plugins/third-party-scripts/plugin.client'))
39-
addServerPlugin(resolver.resolve('./runtime/plugins/third-party-scripts/nitro.plugin'))
38+
addPlugin(resolver.resolve('./runtime/third-party-scripts/plugin.client'))
39+
addServerPlugin(resolver.resolve('./runtime/third-party-scripts/nitro.plugin'))
4040

4141
nuxt.hook('prepare:types', ({ references }) => {
4242
references.push({
@@ -46,7 +46,7 @@ export default defineNuxtModule<ModuleOptions>({
4646

4747
if (options.devtools) {
4848
setupDevToolsUI(nuxt, resolver)
49-
addPlugin(resolver.resolve('./runtime/plugins/vue-tracer-state.client'))
49+
addPlugin(resolver.resolve('./runtime/core/plugins/vue-tracer-state.client'))
5050
}
5151
},
5252
})

src/plugins/hydration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const InjectHydrationPlugin = createUnplugin(() => {
1919
// Add useHydrationCheck after the <script setup> tag
2020
m.appendRight(
2121
match.index + match[0].length,
22-
`\nimport { useHydrationCheck } from '@nuxt/hints/runtime/composables/hydration'\nuseHydrationCheck();`,
22+
`\nimport { useHydrationCheck } from '@nuxt/hints/runtime/hydration/composables'\nuseHydrationCheck();`,
2323
)
2424

2525
return {
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)