benmerckx/genes

Merge "field access" imports

kevinresol opened this issue · 4 comments

Something like this

@:jsRequire('semantic-ui-react', 'Dropdown.Header')

produces:

import {Dropdown.Header, Dropdown.Menu, Dropdown} from "semantic-ui-react"

and that causes syntax error.

In fact a single import {Dropdown} from ... suffices.

Now it generates import Dropdown from "semantic-ui-react", missing curly braces?

I got my 1.7MB js (bundled 6MB) web app running after manually patching for this one. And apparently everything is working!

Magical! :) I imagine you're going this route to eventually get tree shaking going? I still have to look into the requirements to mark haxe classes as "shakeable".

Yeah tree shaking and split bundle :)
Thanks for the amazing work and prompt responses!