Skip to content

Commit 52f70e2

Browse files
committed
update @nuxt/kit to rc1
1 parent baa77c8 commit 52f70e2

File tree

4 files changed

+270
-173
lines changed

4 files changed

+270
-173
lines changed

nuxt/index.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
1-
import { defineNuxtModule, addPluginTemplate } from "@nuxt/kit-edge"
2-
import { fileURLToPath } from "url"
3-
import { dirname, resolve } from "pathe"
1+
import { defineNuxtModule, addPlugin, createResolver } from "@nuxt/kit"
42

53
export default defineNuxtModule({
64
meta: {
75
name: "vue3-notion",
8-
configKey: "vue3-notion",
6+
configKey: "notion",
97
compatibility: {
108
nuxt: "^3.0.0",
119
},
1210
},
1311
setup(options, nuxt) {
14-
const filename = fileURLToPath(import.meta.url)
15-
const __dirname = dirname(filename)
16-
addPluginTemplate({
17-
src: resolve(__dirname, "plugin.ts"),
18-
filename: "vue3-notion.ts",
19-
options,
20-
})
12+
const { resolve } = createResolver(import.meta.url)
13+
addPlugin(resolve("./plugin"))
2114

2215
const notionDeps = ["vue3-notion, fragment-for-vue", "katex", "prismjs"]
2316

nuxt/plugin.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ import { defineNuxtPlugin } from "#app"
55
export default defineNuxtPlugin(({ vueApp, provide }) => {
66
const notion = { getPageBlocks, getPageTable }
77
vueApp.use(VueNotion)
8-
provide("notion", notion)
8+
return {
9+
notion,
10+
}
911
})

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"postversion": "git push && git push --tags"
4848
},
4949
"dependencies": {
50-
"@nuxt/kit-edge": "^3.0.0-27449998.32cf973",
50+
"@nuxt/kit": "^3.0.0-rc.1",
5151
"fragment-for-vue": "^1.0.1",
5252
"katex": "^0.15.1",
5353
"pathe": "^0.2.0",

0 commit comments

Comments
 (0)