How should I go about updating a project from AMD to system?

53 views
Skip to first unread message

samu.a...@gmail.com

unread,
Feb 21, 2016, 11:08:23 AM2/21/16
to SystemJS
I tried upgrading, but whenever I open the html file, it says "not well-formed".

this is the code I am using:

System.config({
baseURL: "./js",
map: {
Phaser: "../phaser.js"
}
});
window.define = System.amdDefine;
window.require = window.requirejs = System.amdRequire;
System.import("game.js")

Guy Bedford

unread,
Feb 23, 2016, 10:07:42 AM2/23/16
to samu.a...@gmail.com, SystemJS
The upgrade path is not a comprehensive one and does require careful testing.

If you can share more information about the exact error it may be possible to assist.

--
You received this message because you are subscribed to the Google Groups "SystemJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to systemjs+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

samu.a...@gmail.com

unread,
Feb 28, 2016, 6:28:32 AM2/28/16
to SystemJS, samu.a...@gmail.com
Considering it is not easy to automatically use AMD files, I think I might just rewrite the imports and exports. Is there any native JS (no ES6 compiliers) syntax that systemJS supports? I'm very confused.

Guy Bedford

unread,
Feb 28, 2016, 1:38:02 PM2/28/16
to samu.a...@gmail.com, SystemJS
Perhaps start with some simple test cases to understand what AMD is and isn't supported.

Any AMD module will load, but AMD config and AMD plugins are not supported and need to be converted into SystemJS.

I'm not sure I fully understand your question. If you don't want to use ES6 modules, AMD is a good format to use in SystemJS, and supported equally to CommonJS.
Reply all
Reply to author
Forward
0 new messages