-
Notifications
You must be signed in to change notification settings - Fork 59
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
Transpile preserving ES imports/exports #117
Conversation
I'd prefer to only change the Docs (removing the suggestions on inheriting babel packages and config) and use this method aeternity/aepp-contracts#19 |
It is great that it turned out that this package can be installed simpler, but I think we still have some features that should be transpired on our side, for example,
as I understand, in general case it can't be done on the user's side automatically. |
As far as I understand: this is not correct. |
So, |
What I'm saying is that Webpack 4 (+ Babel 7) is smart enough, that when you "include" (from your project) the required exclude: /node_modules/, // default exclusion for many front-end projects
include: [/node_modules\/@aeternity/, /node_modules\/rlp/], // additional row to have transpilation and tree-shaking of SDK modules It applies that specific modules' babel config to its code, and come back with a transpiled version of them, following the instruction of the modules' babel config. So @davidyuk @mpowaga @nduchak Make sense? |
Closing due to inactivity. |
SDK uses some ES features that are not available by default in some environments. Its documentation asks the user to install some Babel plugins that enables proper transpiling of this features.
Actually, it is not necessary because the code using this features can be transpired into plain JavaScript on the side of SDK preserving ES imports/exports that are necessary for Tree shaking. This PR setup the build of SDK sources into a set of ES modules that don't use modern features except for ES imports/exports.