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

Review "main" and "browser" entries on package.json #105

Closed
zenorocha opened this issue Oct 28, 2015 · 2 comments
Closed

Review "main" and "browser" entries on package.json #105

zenorocha opened this issue Oct 28, 2015 · 2 comments

Comments

@zenorocha
Copy link
Owner

Both browserify and webpack relies on mainand browser fields and we want to improve the user experience when requiring this module.

Related to #15 #27

@zenorocha
Copy link
Owner Author

This includes moving browserify and babelify out from dependencies to devDependencies https://github.com/zenorocha/clipboard.js/blob/master/package.json#L25-L26

@vccortez
Copy link
Contributor

So, as far as I know, the browser field is only used by module bundlers in its simplest form (a string value pointing to the alternative main file).

If for some reason module bundler users prefer to work with unbundled files, then as pointed out by @daviferreira, we could, for example, add a browser folder with babel compiled sources (not yet bundled), and set the browser field to point to browser/clipboard.js.

I submitted a pull request in #106 to address the browser field issue.

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