Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-06-06 09:35:40 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ac7db35c50794be10356236aa4431e30ad7c5c89
ac7db35c
1 parent
bb8ece02
🔧 build: 在vue3+vite项目下按需引入vant报错Failed to resolve import解决方案
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
vite.config.js
vite.config.js
View file @
ac7db35
...
...
@@ -25,6 +25,13 @@ export default ({ command, mode }) => {
vue
(),
styleImport
({
resolves
:
[
VantResolve
()],
libs
:
[
{
libraryName
:
'vant'
,
esModule
:
true
,
resolveStyle
:
name
=>
`../es/
${
name
}
/style`
}
]
}),
dynamicImport
(),
// 增强 Vite 内置的 dynamic import, 支持在 import() 中使用别名
// legacy({
...
...
Please
register
or
login
to post a comment