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

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
},
主站蜘蛛池模板: 进贤县| 滦平县| 新巴尔虎左旗| 苍山县| 广南县| 鄂托克前旗| 两当县| 虎林市| 资源县| 静宁县| 深水埗区| 邯郸市| 和田市| 安泽县| 辽阳市| 遂川县| 英德市| 信丰县| 寿宁县| 三明市| 嘉善县| 屯留县| 澜沧| 大名县| 凤庆县| 惠东县| 罗田县| 黔江区| 石城县| 友谊县| 绥德县| 小金县| 韶山市| 漾濞| 吉水县| 凯里市| 沛县| 兴海县| 漳平市| 水富县| 定襄县|