mirror of
https://github.com/youzan/vant.git
synced 2025-12-24 02:02:09 +08:00
[new feature] support es module (#875)
This commit is contained in:
@@ -16,9 +16,14 @@ npm i babel-plugin-import -D
|
||||
|
||||
```js
|
||||
// set babel config in .babelrc or babel-loader
|
||||
// Note: Don't set libraryDirectory if you are using webpack 1.
|
||||
{
|
||||
"plugins": [
|
||||
["import", { "libraryName": "vant", "style": true }]
|
||||
["import", {
|
||||
"libraryName": "vant",
|
||||
"libraryDirectory": "es",
|
||||
"style": true
|
||||
}]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
@@ -16,9 +16,14 @@ npm i babel-plugin-import -D
|
||||
|
||||
```js
|
||||
// 在 .babelrc 或 babel-loader 中添加插件配置
|
||||
// 注意:webpack 1 无需设置 libraryDirectory。
|
||||
{
|
||||
"plugins": [
|
||||
["import", { "libraryName": "vant", "style": true }]
|
||||
["import", {
|
||||
"libraryName": "vant",
|
||||
"libraryDirectory": "es",
|
||||
"style": true
|
||||
}]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user