Skip to content

Commit a6d5adf

Browse files
fix(search): update DocSearch imports
Closes #410.
1 parent 4f25b97 commit a6d5adf

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"build": "vuepress build src"
1010
},
1111
"dependencies": {
12+
"@docsearch/js": "^1.0.0-alpha.27",
13+
"@docsearch/css": "^1.0.0-alpha.27",
1214
"axios": "^0.19.1",
1315
"showdown": "^1.9.1"
1416
}

src/.vuepress/theme/components/AlgoliaSearchBox.vue

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,8 @@ export default {
4141
},
4242
initialize (userOptions, lang) {
4343
Promise.all([
44-
import(
45-
/* webpackChunkName: "docsearch" */ '../node_modules/@docsearch/js'
46-
),
47-
import(
48-
/* webpackChunkName: "docsearch" */ '../node_modules/@docsearch/css'
49-
)
44+
import(/* webpackChunkName: "docsearch" */ '@docsearch/js'),
45+
import(/* webpackChunkName: "docsearch" */ '@docsearch/css')
5046
]).then(([docsearch]) => {
5147
docsearch = docsearch.default
5248
@@ -58,7 +54,7 @@ export default {
5854
userOptions,
5955
{
6056
container: '#docsearch',
61-
// #697 Make docsearch work well at i18n mode.
57+
// #697 Make DocSearch work well in i18n mode.
6258
searchParameters: Object.assign(
6359
{},
6460
// lang && {

src/.vuepress/theme/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,9 @@
2121
"author": "Ben Hong",
2222
"main": "index.js",
2323
"dependencies": {
24-
"@docsearch/js": "^1.0.0-alpha.26",
25-
"@docsearch/css": "^1.0.0-alpha.26",
2624
"@vuepress/plugin-active-header-links": "^1.3.1",
2725
"@vuepress/plugin-nprogress": "^1.3.1",
2826
"@vuepress/plugin-search": "^1.3.1",
29-
"docsearch.js": "^2.5.2",
3027
"lodash": "^4.17.15",
3128
"stylus": "^0.54.5",
3229
"stylus-loader": "^3.0.2",

0 commit comments

Comments
 (0)