Skip to content

Commit 3825998

Browse files
committed
fix pnpm run dev failed:[Error: ENAMETOOLONG: name too long, stat]
1 parent d3cfe0b commit 3825998

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: src/.vuepress/config.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import { webpackBundler } from '@vuepress/bundler-webpack'
22
import { defineUserConfig } from "vuepress";
3+
import { getDirname, path } from 'vuepress/utils'
34
import theme from "./theme.js";
45
import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics'
56
import { registerComponentsPlugin } from '@vuepress/plugin-register-components'
67

8+
const __dirname = getDirname(import.meta.url)
9+
710
export default defineUserConfig({
811
base: "/",
912

@@ -47,7 +50,7 @@ export default defineUserConfig({
4750
id: 'G-CN4DXNE50P',
4851
}),
4952
registerComponentsPlugin({
50-
componentsDir: 'src/.vuepress/components',
53+
componentsDir: path.resolve(__dirname, './components'),
5154
}),
5255
],
5356

0 commit comments

Comments
 (0)