The package-specs field
The package-specs field contains two fields: module and in-source.
The module field controls the JavaScript module format. The default is commonjs, and other available options include amdjs, amdjs-global, es6, and es6-global. The -global part tells BuckleScript to resolve node_modules to relative paths for browsers.
The in-source field controls the destination of the generated JavaScript files; true results in the generated files being placed along side source files, and false results in the generated files being placed in lib/js. Setting in-source to false is useful when using Reason within an existing JavaScript project so that the existing build pipeline can be used without having to change.
Let's use the "es6" ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access