Skip to content

Commit

Permalink
fix: updated nuxt dependency, replaced addAutoImport with addImports
Browse files Browse the repository at this point in the history
  • Loading branch information
quamsta authored and ymmooot committed Nov 18, 2022
1 parent 87ea428 commit 7d98d17
Show file tree
Hide file tree
Showing 3 changed files with 1,064 additions and 1,124 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^29.0.1",
"nuxt": "3.0.0-rc.8",
"nuxt": "^3.0.0",
"prettier": "^2.5.1",
"shipjs": "0.24.4",
"tsup": "^6.0.1",
Expand Down
7 changes: 2 additions & 5 deletions src/module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { resolve } from 'pathe';
import { defineNuxtModule, addPlugin, addAutoImport } from '@nuxt/kit';
import { defineNuxtModule, addPlugin, addImports } from '@nuxt/kit';
import type { Nuxt } from '@nuxt/schema';
import type { JsonLDFunc } from './types';

Expand All @@ -20,10 +20,7 @@ export default defineNuxtModule<ModuleOptions>({
const composable = resolve(__dirname, './runtime/composable');
nuxt.options.build.transpile.push(runtimeDir);
nuxt.options.alias['#jsonld'] = composable;
addAutoImport({
name: 'useJsonld',
from: composable,
});
addImports([{ name: 'useJsonld', as: 'useJsonld', from: composable }]);

if (!options.disableOptionsAPI) {
addPlugin(resolve(runtimeDir, 'plugin'));
Expand Down
Loading

0 comments on commit 7d98d17

Please sign in to comment.