Skip to content

Commit

Permalink
fix: apiPlugin error by nuxt vite config
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawntraoz committed Jan 12, 2023
1 parent 6519826 commit 9df9fae
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 27 deletions.
5 changes: 5 additions & 0 deletions lib/src/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ export default defineNuxtModule({
setup(options, nuxt) {
const resolver = createResolver(import.meta.url);

nuxt.options.vite.optimizeDeps.include =
nuxt.options.vite.optimizeDeps.include || [];
nuxt.options.vite.optimizeDeps.include.push("@storyblok/nuxt");
nuxt.options.vite.optimizeDeps.include.push("@storyblok/vue");

// Enable dirs
// nuxt.options.components.dirs = ["~/components/storyblok"];
addComponentsDir({ path: "~/storyblok", global: true, pathPrefix: false });
Expand Down
106 changes: 84 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9df9fae

Please sign in to comment.