Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2022-09-07 16:04:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5b26a7eb051a26b02b6af9a249ea2868e0ebe19c
5b26a7eb
1 parent
eb4ca3a5
✨ feat: vant引入样式入口调整
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
src/main.js
vite.config.js
src/main.js
View file @
5b26a7e
...
...
@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-31 12:06:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-09-0
6 16:25:52
* @LastEditTime: 2022-09-0
7 15:14:40
* @FilePath: /data-table/src/main.js
* @Description:
*/
...
...
@@ -15,6 +15,7 @@ import axios from '@/utils/axios';
// import 'default-passive-events'; // 解决Chrome控制台non-passive event listener输出问题
import
{
createPinia
}
from
'pinia'
;
import
vueEsign
from
'vue-esign'
import
'vant/lib/index.css'
;
const
pinia
=
createPinia
();
const
app
=
createApp
(
App
);
...
...
vite.config.js
View file @
5b26a7e
...
...
@@ -25,16 +25,16 @@ export default ({ command, mode }) => {
// define: '', // 定义全局常量替换方式。其中每项在开发环境下会被定义在全局,而在构建时被静态替换。
plugins
:
[
// 将要用到的插件数组。Falsy 虚值的插件将被忽略,插件数组将被扁平化(flatten)。查看 插件 API 获取 Vite 插件的更多细节。
vue
(),
styleImport
({
resolves
:
[
VantResolve
()],
libs
:
[
{
libraryName
:
'vant'
,
esModule
:
true
,
resolveStyle
:
name
=>
`../es/
${
name
}
/style`
}
]
}),
// 按需引入 vant 位置报错问题
//
styleImport({
//
resolves: [VantResolve()],
//
libs: [
//
{
//
libraryName: 'vant',
//
esModule: true,
//
resolveStyle: name => `../es/${name}/style`
//
}
//
]
//
}), // 按需引入 vant 位置报错问题
dynamicImport
(),
// 增强 Vite 内置的 dynamic import, 支持在 import() 中使用别名
// legacy({
// targets: ['defaults', 'not IE 11']
...
...
Please
register
or
login
to post a comment