Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul consumption model #1521

Open
treshugart opened this issue Aug 31, 2018 · 2 comments
Open

Overhaul consumption model #1521

treshugart opened this issue Aug 31, 2018 · 2 comments
Milestone

Comments

@treshugart
Copy link
Member

Currently there's main, module and browser fields in the package.json. We also have dist/cjs, dist/esm and dist/esnext. These are really confusing, but up to this point they've been necessary due to the decision to use native ES classes at the custom element level.

With the changes to Babel 7, and the plugins to transform HTMLElement extensions differently, we should look at offering a single entry point that's as simple as possible to use. We should also ensure that this is properly documented.

@morewry
Copy link

morewry commented Dec 2, 2018

Just ran into a little issue with this trying to build skatejs@5.2.4 with Rollup; rollup-plugin-node-resolve doesn't support the esnext field that I needed to get at dist/esnext. Couldn't figure out for a bit why I was getting transpiled classes in my output that was ostensibly using the module entrypoint even though my Babel configuration should have been leaving them alone.

FWIW my current preference on this is to have a browser distribution transpiled with last 2 versions, not dead and a module distribution that presumes prior-year ES support.

@treshugart
Copy link
Member Author

I'd like to just ship esmodules. Not sure if that's possible given usage in a node environment, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants