You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2019/09/19 09:13:32 UTC
[GitHub] [incubator-echarts] 100pah opened a new issue #11281: UMD wrapper
may be need to update to fit some env that not standard
100pah opened a new issue #11281: UMD wrapper may be need to update to fit some env that not standard
URL: https://github.com/apache/incubator-echarts/issues/11281
### Version
4.3.0
### Steps to reproduce
Record an issue here:
In some runtime environment that not standard (like smart app / mini app)
The UMD wrapper will detect that there is `export` / `module export`.
But the `export` and `module export` might be not the same,
which brings some error.
Essential this issue dues to the implementation of those runtime environments.
But in some cases, we can not push the env to modify it.
So we might have to make some compatible code, like what we previously did for IE6.
### What is expected?
The compatible code might be:
Use
```js
typeof exports === 'object' && typeof module !== 'undefined' ?
(funtion () {
var ex = {};
factory(ex);
for(var key in ex) {
ex.hasOwnProperty(key) && exports[key] = ex[key] && modules.exports && modules.exports[key] = ex[key];
}
})() : ...
```
to replace the original code in UMD wrapper:
```js
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : ...
```
### What is actually happening?
-
<!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
<!-- This issue is in English. DO NOT REMOVE -->
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org