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

Simplify package installation and usage #196

Closed
davidyuk opened this issue Jan 4, 2019 · 5 comments
Closed

Simplify package installation and usage #196

davidyuk opened this issue Jan 4, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@davidyuk
Copy link
Member

davidyuk commented Jan 4, 2019

Wait, it just means import and export – not other future JavaScript features?
Yes. If you're using things like arrow functions and classes (or more exotic features like decorators and object spread), you should transpile them if you want your library to work in environments that don't support those features. Otherwise, whoever uses your library will have to transpile it themselves, including configuring their transpiler to handle your code, which might involve esoteric transforms and conflicting versions of Babel.
It's a frequent source of frustration. Be a responsible library author and ship code that actually runs in the environments you support!

https://github.com/rollup/rollup/wiki/pkg.module#wait-it-just-means-import-and-export--not-other-future-javascript-features

This article says that tree-shakable code can be delivered in a way that doesn't ask a user to make any additional setup on his side. As I see it is true because all packages that I'm using doesn't require additional setup except JS SDK.

Expected Behavior

import <...> from '@aeternity/aepp-sdk';
// tree-shakable, without changes in Webpack configs

Current Behavior

import <...> from '@aeternity/aepp-sdk/es';

, required changes in Webpack configs

Possible Solution

Transpile all es6 features except import/export

Possible Implementation

#117

@davidyuk davidyuk added the enhancement New feature or request label Jan 4, 2019
@j77ar
Copy link

j77ar commented Jan 10, 2019

Boot

@davidyuk
Copy link
Member Author

Is it closed accidentally?

@davidyuk davidyuk reopened this May 20, 2019
@noandrea
Copy link
Contributor

noandrea commented Nov 5, 2019

is this still relevant?

@davidyuk
Copy link
Member Author

davidyuk commented Nov 6, 2019

sure! I hope it would be implemented someday

@davidyuk
Copy link
Member Author

fixed in PRs referenced above

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

No branches or pull requests

4 participants