官术网_书友最值得收藏!

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 commonjsand other available options include amdjs, amdjs-globales6, 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" module format for now, and place our compiled assets in lib/js:

"package-specs": {
"module": "es6",
"in-source": false
},
主站蜘蛛池模板: 平阴县| 普兰县| 墨竹工卡县| 星座| 同仁县| 东源县| 东台市| 东乡| 资源县| 彰武县| 扎囊县| 渑池县| 安泽县| 霍城县| 伊川县| 大港区| 文山县| 安庆市| 米泉市| 高清| 安义县| 龙井市| 佛山市| 玛沁县| 库伦旗| 班玛县| 当雄县| 拜城县| 乌鲁木齐县| 昌平区| 东光县| 永定县| 平和县| 丹东市| 静海县| 西乌| 班戈县| 剑阁县| 郴州市| 新安县| 长阳|