forked from meilisearch/vuepress-plugin-meilisearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
24 lines (22 loc) · 773 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const path = require('path')
const { constructClientAgents } = require('./client_agents')
module.exports = (options) => {
return {
alias: {
'@SearchBox': path.resolve(__dirname, 'MeiliSearchBox.vue')
},
define: {
HOST_URL: options.hostUrl || null,
API_KEY: options.apiKey || null,
INDEX_UID: options.indexUid || null,
PLACEHOLDER: options.placeholder || null,
MAX_SUGGESTIONS: options.maxSuggestions || null,
HOT_KEYS: options.hotKeys || ['s', '/'],
CROP_LENGTH: options.cropLength || 30,
LAYOUT: options.layout || 'columns',
DEBUG: options.debug || false,
ENABLE_DARK_MODE: options.enableDarkMode || false,
CLIENT_AGENTS: constructClientAgents(options.clientAgents) || []
}
}
}