Skip to content

Commit

Permalink
fix(module): rc9 compatibility issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Intevel committed Sep 8, 2022
1 parent be0d9d9 commit 97c4a10
Show file tree
Hide file tree
Showing 3 changed files with 1,134 additions and 878 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"dependencies": {
"@algolia/recommend": "^4.12.2",
"@nuxt/kit": "^3.0.0-rc.3",
"@nuxt/kit": "^3.0.0-rc.9",
"algoliasearch": "^4.11.0",
"instantsearch.css": "^7.4.5",
"metadata-scraper": "^0.2.49",
Expand All @@ -48,7 +48,7 @@
"@nuxt/module-builder": "latest",
"@nuxtjs/eslint-config-typescript": "latest",
"eslint": "latest",
"nuxt": "^3.0.0-rc.4",
"nuxt": "^3.0.0-rc.9",
"standard-version": "^9.3.2"
},
"publishConfig": {
Expand Down
9 changes: 3 additions & 6 deletions src/module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { resolve } from 'path'
import { fileURLToPath } from 'url'
import { defineNuxtModule, addPlugin, addComponentsDir, addServerHandler } from '@nuxt/kit'
import { defineNuxtModule, addPlugin, addComponentsDir, addServerHandler, addAutoImportDir } from '@nuxt/kit'
import type { MetaData } from 'metadata-scraper/lib/types'
import defu from 'defu'
import { createPageGenerateHook, createGenerateDoneHook, CrawlerPage, CrawlerHooks } from './hooks'
Expand Down Expand Up @@ -58,7 +58,7 @@ export default defineNuxtModule<ModuleOptions>({
name: '@nuxtjs/algolia',
configKey: 'algolia',
compatibility: {
nuxt: '^3.0.0 || ^2.16.0',
nuxt: '^3.0.0-rc.9 || ^2.16.0',
bridge: true
}
},
Expand Down Expand Up @@ -161,10 +161,7 @@ export default defineNuxtModule<ModuleOptions>({
}

addPlugin(resolve(runtimeDir, 'plugin'))

nuxt.hook('autoImports:dirs', (dirs) => {
dirs.push(resolve(runtimeDir, 'composables'))
})
addAutoImportDir(resolve(runtimeDir, 'composables'))

if (options?.indexer && Object.keys(options?.indexer).length) {
const cmsProvider = Object.keys(options.indexer)[0]
Expand Down
Loading

0 comments on commit 97c4a10

Please sign in to comment.