Skip to content

Commit cbab5b5

Browse files
chore: wip
1 parent 89ccd8b commit cbab5b5

File tree

10 files changed

+4121
-319
lines changed

10 files changed

+4121
-319
lines changed

bun.lock

Lines changed: 256 additions & 297 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
},
7272
"workspaces": [
7373
"packages/*",
74-
"playground",
75-
"playground-nuxt"
74+
"playground"
7675
]
7776
}

packages/nuxt/playground/app.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
<template>
2-
<div>
3-
Nuxt module playground!
4-
</div>
5-
</template>
2+
<TestComponent />
3+
</template>

packages/nuxt/playground/bun.lock

Lines changed: 3839 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export default defineNuxtConfig({
2-
modules: ['../src/module'],
3-
myModule: {},
2+
modules: ['ts-maps-nuxt'],
43
devtools: { enabled: true },
54
})

packages/nuxt/playground/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
"generate": "nuxi generate"
99
},
1010
"dependencies": {
11-
"nuxt": "^4.0.3"
12-
}
11+
"nuxt": "^4.0.3",
12+
"ts-maps-nuxt": "workspace:*"
13+
},
14+
"workspaces": [
15+
"../../*"
16+
]
1317
}

packages/nuxt/src/module.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { addComponentsDir, addPlugin, createResolver, defineNuxtModule } from '@nuxt/kit'
1+
import { addComponent, addComponentsDir, addPlugin, createResolver, defineNuxtModule } from '@nuxt/kit'
22

33
// Module options TypeScript interface definition
44
export interface ModuleOptions {
@@ -20,10 +20,8 @@ export default defineNuxtModule<ModuleOptions>({
2020
// Do not add the extension since the `.ts` will be transpiled to `.mjs` after `npm run prepack`
2121
addPlugin(resolver.resolve('./runtime/plugin'))
2222

23-
// Add components directory
2423
addComponentsDir({
2524
path: resolver.resolve('./runtime/components'),
26-
prefix: options.prefix,
2725
pathPrefix: false,
2826
})
2927
},
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { defineNuxtPlugin } from '#imports'
22

33
export default defineNuxtPlugin((_nuxtApp) => {
4-
// Plugin logic can be added here
4+
55
})

packages/nuxt/test/fixtures/basic/nuxt.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { defineNuxtConfig } from '#imports'
12
import MyModule from '../../../src/module'
23

34
export default defineNuxtConfig({

packages/nuxt/tsconfig.json

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
{
2-
"extends": "./.nuxt/tsconfig.json",
3-
"exclude": [
4-
"dist",
5-
"node_modules",
6-
"playground",
7-
"**/*.md"
8-
]
9-
}
2+
"compilerOptions": {
3+
"target": "ESNext",
4+
"module": "ESNext",
5+
"moduleResolution": "bundler",
6+
"strict": true,
7+
"strictNullChecks": true,
8+
"allowSyntheticDefaultImports": true,
9+
"esModuleInterop": true,
10+
"skipLibCheck": true,
11+
"forceConsistentCasingInFileNames": true,
12+
"composite": true
13+
}
14+
}

0 commit comments

Comments
 (0)