在vitepress/config.js中配置vite的,为什么执行pnpm docs:build后,vite配置并没有生效?依然报错:ERR_UNSUPPORTED_DIR_IMPORT,解析不到目录中的index开头的文件 #4479
Unanswered
James-9696
asked this question in
Q&A
Replies: 1 comment
-
vite: { |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
vitepress/config.js文件:
import { defineConfig } from 'vitepress'
// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "My Awesome Project",
description: "A VitePress Site",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'Home', link: '/' },
{ text: 'Examples', link: '/markdown-examples' }
],
},
vite: {
resolve: {
extensions: ['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json', '.css', '.less','.saas', '.vue']
}
}
})
Beta Was this translation helpful? Give feedback.
All reactions