You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since release candidate of vuepress the way to use plugins changed as most of them now are built in with the default theme. However, I still have two plugins outside the default theme offering that I cannot get to work. The following plugins are: docSearch and GoogleAnalytics.
Currently my vuepress config looks something like this:
import { viteBundler } from '@vuepress/bundler-vite'
import { docsearchPlugin } from '@vuepress/plugin-docsearch'
import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics'
export default defineUserConfig({
theme: defaultTheme({
...
...}),
bundler: viteBundler(),
My question is where would I define the doc search and google analytics plugins to get it work. I've tried both using plugin [] and themePlugin[] in and outside theme [] paragraph.
EDIT:
Google Analytics did work, with the following setup:
However, when setting up docSearch the same way as above I retrieve the following error:
[vite]: Rollup failed to resolve import "..../docs/.vuepress/.temp/pages/index.html.js" from "..../docs/.vuepress/.temp/internal/pagesData.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
Since release candidate of vuepress the way to use plugins changed as most of them now are built in with the default theme. However, I still have two plugins outside the default theme offering that I cannot get to work. The following plugins are: docSearch and GoogleAnalytics.
Currently my vuepress config looks something like this:
My question is where would I define the doc search and google analytics plugins to get it work. I've tried both using plugin [] and themePlugin[] in and outside theme [] paragraph.
EDIT:
Google Analytics did work, with the following setup:
However, when setting up docSearch the same way as above I retrieve the following error:
EDIT:
Resolved by updating docsearch to 2.0.0-rc.14.
Best regards,
Fredrik
Beta Was this translation helpful? Give feedback.
All reactions