apache / incubator-weex-loader

Apache License 2.0
65 stars 32 forks source link

[Proposal] Support original `define` and `require` #34

Closed Hanks10100 closed 6 years ago

Hanks10100 commented 7 years ago

Currently, weex-loder will generate __weex_define__ instead of the original define. But the old version of weex js framework doesn't support this variable.

The js bundle generated by weex-loader couldn't run on js framework below v0.13.8. This problem should be fixed to improve the compatibility.

Jinjiang commented 7 years ago

My suggestion is old version js framework could work with old version weex-loader.

Jinjiang commented 7 years ago

define and require is recommended to be preserved keywords for other 3rd-party packaging tools. That's why we give up them in new version.

Hanks10100 commented 7 years ago

Does it possible to support both define and __weex_define__ at the same time ? If the loader can't achieve it, at least should provide an configuration or specific version to do this.

Jinjiang commented 7 years ago

It's not recommended. What we should do is encourage people use latest version, not do more things for the past.