#1173 Move away from hardcoded amd module ids

已關閉
nero8 年之前創建 · 1 條評論

Originally at 2015-04-10T20:51:22Z by Herbert Vojčík

Amber packages are loaded as AMD modules, they specify their list of dependencies and those lists should be stable enough so they can be relied upon and will not be suddenly renamed by third-party (like the library author), rendering the package unloadable.

Before .amd.json files and mechanism of generation of path mapping in config.js, this was a big issue which led to the decision to hardcode module ids in their define call, despite knowing this is not the preferred solution in AMD circles.

Now, with having .amd.json files and coming up with other techniques easing rename-migration ("map" section with "forwarding pointers"), this is less of an issue and preferred method of not having an id hardcoded, but instead constructed by loader itself from path prefix and file name itself, is achievable.

The plan is eventually move there with Amber.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Originally at 2015-04-10T20:51:22Z by Herbert Vojčík Amber packages are loaded as AMD modules, they specify their list of dependencies and those lists should be stable enough so they can be relied upon and will not be suddenly renamed by third-party (like the library author), rendering the package unloadable. Before .amd.json files and mechanism of generation of path mapping in config.js, this was a big issue which led to the decision to hardcode module ids in their define call, despite knowing this is not the preferred solution in AMD circles. Now, with having .amd.json files and coming up with other techniques easing rename-migration ("map" section with "forwarding pointers"), this is less of an issue and preferred method of not having an id hardcoded, but instead constructed by loader itself from path prefix and file name itself, is achievable. The plan is eventually move there with Amber. <bountysource-plugin> --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/10881553-move-away-from-hardcoded-amd-module-ids?utm_campaign=plugin&utm_content=tracker%2F79201&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F79201&utm_medium=issues&utm_source=github). </bountysource-plugin>
Herby Vojčík commented 7 年之前
所有者

Landed in d16a0d2.

Landed in d16a0d2.
herby7 年之前 關閉
Sign in to join this conversation.
未選擇標籤
未選擇里程碑
未指派成員
2 參與者
正在加載...
取消
保存
尚未有任何內容