Skip to content

Commit 7005869

Browse files
committed
chore: drop cjs build and restore to starter dir structure
1 parent 10f3d56 commit 7005869

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

package.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@
88
"repository": "teages/nuxt-legacy",
99
"exports": {
1010
".": {
11-
"types": "./dist/module.d.ts",
12-
"import": "./dist/module.mjs",
13-
"require": "./dist/module.cjs"
11+
"types": "./dist/types.d.mts",
12+
"import": "./dist/module.mjs"
13+
}
14+
},
15+
"main": "./dist/module.mjs",
16+
"typesVersions": {
17+
"*": {
18+
".": [
19+
"./dist/types.d.mts"
20+
]
1421
}
1522
},
16-
"main": "./dist/module.cjs",
17-
"types": "./dist/module.d.ts",
1823
"files": [
1924
"dist"
2025
],

src/module.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
import type { ModuleOptions } from './types'
1+
import type { Options as ViteLegacyOptions } from '@vitejs/plugin-legacy'
22
import { addServerTemplate, createResolver, defineNuxtModule } from '@nuxt/kit'
3+
34
import { setupVite } from './setup/vite'
45

56
export { cspHashes } from './csp'
6-
export * from './types'
7+
8+
export interface ModuleOptions {
9+
vite?: ViteLegacyOptions
10+
}
11+
12+
export type { ViteLegacyOptions }
713

814
export default defineNuxtModule<ModuleOptions>({
915
meta: {

src/types.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)