atomicojs / atomico

Atomico a micro-library for creating webcomponents using only functions, hooks and virtual-dom.
https://atomicojs.dev
MIT License
1.16k stars 43 forks source link

Unexpected token: 'export' #16

Closed dy closed 4 years ago

dy commented 4 years ago

I was trying to illustrate #10 with codesandbox, and seems that atomico breaks there: https://codesandbox.io/s/fervent-cohen-1lymq?fontsize=14

UpperCod commented 4 years ago

Thanks for notifying, the problem happens because of a parcel resolution but only in codesanbox, if you download and install the same image on your computer it will work correctly.

It can be solved by importing from atomico/src, but it is still a BUG that I am analyzing.

https://codesandbox.io/s/immutable-field-79hd9

Atomico uses rollup to optimize the import, this generates 2 chunk, apparently codesanbox does not solve the chunk.... you want atomic you don't need rollup, the code could be distributed without the need to minify what do you think about this?

UpperCod commented 4 years ago

Solved, check https://codesandbox.io/s/immutable-field-79hd9

dy commented 4 years ago

Awesome!