airyland / airyland/vux-loader

在 babel @babel/preset-env 配置下,无法 import vux 的 commonjs 模块

Open
#49 2 comments 0 reactions 0 assignees View on GitHub
webpack
Dominant language
JavaScript
Stars
64
Forks
37
PR merge metrics
No merged PRs in 30d

Description

无法 import `TransferDomDirective`

报错信息:

![image](https://user-images.githubusercontent.com/11362506/34714402-50a77f90-f564-11e7-897e-e1b007cf343d.png)

完整demo见:

https://github.com/hooraygith/vux-loader-test

`.babelrc` 配置如下:

```
{
"presets": [
["@babel/preset-env", {
"useBuiltIns": "usage",
"modules": false
}]
]
}
```

将 `useBuiltIns` 和 `modules` 配置去掉可以打包;

webpack 配置里将 `vuxLoader.merge` 去掉则可以 import 自己写的 commonjs 模块

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.