mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:48:55 +08:00
chore: 修复 vite import css 失败问题
This commit is contained in:
parent
a437917ee5
commit
95d2fc108f
@ -341,14 +341,14 @@ html 中引入:
|
||||
js 中引入:
|
||||
|
||||
```js
|
||||
import './node_modules/amis/lib/themes/cxd.css';
|
||||
import './node_modules/amis/lib/helper.css';
|
||||
import './node_modules/amis/sdk/iconfont.css';
|
||||
// 或 import './node_modules/amis/lib/themes/antd.css';
|
||||
import 'amis/lib/themes/cxd.css';
|
||||
import 'amis/lib/helper.css';
|
||||
import 'amis/sdk/iconfont.css';
|
||||
// 或 import 'amis/lib/themes/antd.css';
|
||||
```
|
||||
|
||||
> 上面只是示例,请根据自己的项目结构调整引用路径
|
||||
> 如果要支持 IE 11 请引入 ./node_modules/amis/sdk/cxd-ie11.css,但这样就没法支持 CSS 变量了
|
||||
> 如果要支持 IE 11 请引入 amis/sdk/cxd-ie11.css,但这样就没法支持 CSS 变量了
|
||||
|
||||
2. 渲染器使用配置主题
|
||||
|
||||
|
@ -160,9 +160,25 @@
|
||||
"require": "./lib/index.js",
|
||||
"import": "./esm/index.js"
|
||||
},
|
||||
"./lib/helper.css": {
|
||||
"require": "./lib/helper.css",
|
||||
"import": "./lib/helper.css"
|
||||
},
|
||||
"./lib/themes/*": {
|
||||
"require": "./lib/themes/*",
|
||||
"import": "./lib/themes/*"
|
||||
},
|
||||
"./lib/*": {
|
||||
"require": "./lib/*.js",
|
||||
"import": "./esm/*.js"
|
||||
},
|
||||
"./sdk/*": {
|
||||
"require": [
|
||||
"./sdk/*"
|
||||
],
|
||||
"import": [
|
||||
"./sdk/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"jest": {
|
||||
|
Loading…
Reference in New Issue
Block a user