Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Mar 26, 2024
1 parent 3b4d67a commit 11c5580
Show file tree
Hide file tree
Showing 8 changed files with 1,189 additions and 1,170 deletions.
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"type": "module",
"scripts": {
"build": "vuepress-vite build src",
"dev": "vuepress-vite dev src"
"build": "vuepress build src",
"dev": "vuepress dev src"
},
"devDependencies": {
"@fancyapps/ui": "5.0.35",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/.vuepress/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { defineClientConfig } from 'vuepress/client';

export default defineClientConfig({
setup() {
onMounted(() => Fancybox.bind('#comment .wl-content img'));
onMounted(() => Fancybox.bind('#vp-comment .wl-content img'));
onBeforeUnmount(() => Fancybox.destroy());
},
});
14 changes: 9 additions & 5 deletions docs/src/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addViteSsrNoExternal } from '@vuepress/helper';
import { viteBundler } from '@vuepress/bundler-vite';
import { redirectPlugin } from '@vuepress/plugin-redirect';
import { type UserConfig, defineUserConfig } from 'vuepress';
import { path } from 'vuepress/utils';
Expand All @@ -25,6 +25,14 @@ export default <UserConfig>defineUserConfig({
},
},

bundler: viteBundler({
viteOptions: {
ssr: {
noExternal: ['@fancyapps/ui'],
},
},
}),

theme,

plugins: [redirectPlugin()],
Expand All @@ -40,8 +48,4 @@ export default <UserConfig>defineUserConfig({
'./components/NormalPage',
),
},

extendsBundlerOptions: (bundlerOptions, app) => {
addViteSsrNoExternal(bundlerOptions, app, '@fancyapps/ui');
},
});
Loading

0 comments on commit 11c5580

Please sign in to comment.