Skip to content

Commit

Permalink
update nuxt plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
zernonia committed Nov 10, 2022
1 parent 96cea06 commit df71a81
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions nuxt/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtModule, addPlugin, createResolver } from "@nuxt/kit"
import { defineNuxtModule, addPlugin, createResolver } from "@nuxt/kit";

export default defineNuxtModule({
meta: {
Expand All @@ -9,19 +9,19 @@ export default defineNuxtModule({
},
},
setup(options, nuxt) {
const { resolve } = createResolver(import.meta.url)
addPlugin(resolve("./plugin"))
const { resolve } = createResolver(import.meta.url);
addPlugin(resolve("./plugin"));

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

notionDeps.forEach((dep) => {
nuxt.options.build.transpile.push(dep)
})
nuxt.options.build.transpile.push(dep);
});

if (options.css) {
nuxt.options.css.push("vue3-notion/dist/style.css")
nuxt.options.css.push("prismjs/themes/prism.css")
nuxt.options.css.push("katex/dist/katex.min.css")
nuxt.options.css.push("vue3-notion/dist/style.css");
nuxt.options.css.push("prismjs/themes/prism.css");
nuxt.options.css.push("katex/dist/katex.min.css");
}
},
})
});

0 comments on commit df71a81

Please sign in to comment.