systemjs / systemjs

Dynamic ES module loader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

amd dependencies wrong order

zhangHongEn opened this issue · comments

commented

Demonstration

用法一. 使用dist/s.js + dist/extras/amd.js
deps执行顺序正确, 先deps, 后自己

用法二. 使用dist/system.js
deps执行顺序错误, 先自己, 后deps

我在使用过程中发现, "用法二"对比"用法一"在加载amd格式时还有些其他bug, "用法一"是正确的

Code Sandbox:

Expected Behavior

Actual Behavior

I think it would be helpful to write the issue report in english :)

commented

Usage 1 Use "dist/s.js" + "dist/extras/amd.js"

The execution sequence of DEPs is correct, first DEPs, then self

Usage 2 Use "dist/system.js"

The DEPs execution sequence is wrong. You should execute yourself first and then DEPs

During the use, I found that "usage 2" compared with "usage 1" had some other bugs when loading amd format, and "usage 1" was correct