-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch Loader to AMD or import #143
Comments
If Chrome supported import that'd be best (as woo future!), but being able to run uncompiled is nice so AMD is probably best for now. It should be easy enough to switch in the future when browsers start supporting import (I bet someone will have a tool for it :) |
Ok, I have should have a PR in a day or 3 that's AMDed. It touches every file and sadly it's after my WebGL2 work so far. Sorry it's not all tiny PRs One issue I'm having though is AMD at least using require.js loads more async. I might be able to hack it. but ..
|
Restrictions like that in debug mode are fine I think. When packaged it should still work, and that's how most people use it (I'm hoping! debug is slow!) |
Do you think pull #137 will be solved by this AMD change? Or will what it does be even more required? |
So just to double check I tried an AMD program As I suspected you can't use the debug version of the WebGL-Inspector
All of them work in non-debug mode. The last one shows how to get embed.js Like I said I don't think that's an issue but I thought it was best |
Oh yea, and FYI I effectively reverted #116, not all of it, just the parts on HostUI.js, TraceView.js and TraceTab.js. |
Reverting #116 sounds fine to me! |
Right now there's custom loaders in
core/embed.js
andcore/loader.js
. If I switch to AMD style then I think I can get webpack to do the build automatically. Webpack follows the require calls to find all the included modules which means the build script doesn't have to be updated when new things are added. AMD style can also still be used without compiling as well so that seems like a winI can also switch to use ES style
import
but that can't be used without a compile step.Thoughts? Go AMD? Go Import? Leave it as is?
The text was updated successfully, but these errors were encountered: