You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At least with the Parcel bundler (but seemingly also with Webpack), the code in the lib/esm directory is compiled using the Babel transforms defined for neither the UI components module nor the overall application.
This seems to be a composition of two issues: 1. We don't compile the code in this module except to an ES6 target. Therefore, users must run Babel to get the ES6 code to a usable state, and 2. bundlers don't correctly treat this code as ES6 and transpile.
One weird sidebar with Parcel. When the package is linked with npm link, the correct transformations are applied and the app builds correctly; when it is installed normally from npm nothing works. This seems to relate to this aspect of the Parcel config, in which .babelrc files are sniffed out only if a module is symlinked intonode_modules.
We need to either transpile the code in this module to some other target, or configure package.json so that the correct assumptions are made that the code is ES6 at bundle time. Doing the latter would have the benefit of allowing us to build to whatever target is required by a specific app.
The text was updated successfully, but these errors were encountered:
At least with the Parcel bundler (but seemingly also with Webpack), the code in the
lib/esm
directory is compiled using the Babel transforms defined for neither the UI components module nor the overall application.This seems to be a composition of two issues: 1. We don't compile the code in this module except to an ES6 target. Therefore, users must run Babel to get the ES6 code to a usable state, and 2. bundlers don't correctly treat this code as ES6 and transpile.
One weird sidebar with Parcel. When the package is linked with
npm link
, the correct transformations are applied and the app builds correctly; when it is installed normally fromnpm
nothing works. This seems to relate to this aspect of the Parcel config, in which.babelrc
files are sniffed out only if a module is symlinked intonode_modules
.We need to either transpile the code in this module to some other target, or configure
package.json
so that the correct assumptions are made that the code is ES6 at bundle time. Doing the latter would have the benefit of allowing us to build to whatever target is required by a specific app.The text was updated successfully, but these errors were encountered: