surmon-china / vue-codemirror

@codemirror code editor component for @vuejs
https://github.surmon.me/vue-codemirror
MIT License
3.3k stars 384 forks source link

vue-codemirror v3.0.0 broke support for webpack import #22

Closed amoshydra closed 7 years ago

amoshydra commented 7 years ago

This change https://github.com/surmon-china/vue-codemirror/pull/21 broke support for wepback with ES6 import

import VueCodeMirror from 'vue-codemirror'; throws error:

Cannot assign to read only property 'exports' of object '#<Object>'

It seems to be related to this issue: https://github.com/webpack/webpack/issues/4039 as I am using webpack and ES6 import in my project.

vue-codemirror 2.1.8 does not have this problem

surmon-china commented 7 years ago

v3.0.3 fix it.

amoshydra commented 7 years ago

Upgraded to v3.0.3. It is now working now. Thanks!