Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Chore: set package.json's main to dist #697

Closed
wants to merge 1 commit into from

Conversation

sohkai
Copy link

@sohkai sohkai commented Feb 20, 2018

The main field should probably be pointing to the built version, rather than the original src. Without this, some module bundlers (and uglify) will choke.

@daviddias
Copy link
Contributor

@sohkai are you using the latest uglify-es? The issue is that uglify2 didn't support ES6, uglify3 will do it, it is what we use to get that dist version https://github.com/ipfs/aegir/blob/master/package.json#L81

@sohkai
Copy link
Author

sohkai commented Feb 21, 2018

Even so, I'm of the belief that the main output should always be the transpiled version so that end users don't have to build it themselves.

Getting tree-shaking from import can be done using the pseudostandard module field.

@daviddias
Copy link
Contributor

Closing in favor of tracking this discussion at ipfs/js-ipfs#938 The solution won't require this step. //cc @vmx

@daviddias daviddias closed this Mar 14, 2018
@ghost ghost removed the backlog label Mar 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants