Open frankradocaj opened 12 years ago
In the config bits, are you using a 'context" config?
No. But I am using the following requirejs plugins, if that helps:
noext: '../libs/require/noext', //https://github.com/millermedeiros/requirejs-plugins
async: '../libs/require/async', // Required by google loader
goog: '../libs/require/goog', // Google async loader
propertyParser: '../libs/require/propertyparser', // Required by google loader
My full code is in a Github project: https://github.com/Bowerbird/bowerbird-web/blob/master/Src/Bowerbird.Website/js/main.js
Do you have a test URL I can hit to debug? I do not have the tooling parts set up to do the server parts of that code snippet.
Here is a Gist that exposes the essence of the issue: https://gist.github.com/3037069. Needs require.js copied into the directory too.
FWIW, my testing has shown it works in:
And it doesn't work in:
Thanks! I can reproduce with that gist. I filed a bug with Opera, because I believe it is an issue with the browser. I will post back here as I hear things.
Thanks James! Do you know of any workaround where I could load the bootstrapped data inline and still be requirejs/AMD compatible?
In the meantime, do not use data-main, do a require([]) for it after the inline define.
I have the following inline module that I use to bootstrap data into my app. Works in all browsers except Opera (I've tried Opera v10.0-12.0. Using requirejs v2.0.2.
And my main.js:
Exception thrown in Opera. Seems to be trying to load the bootstrapData via a call to bootstrap-data.js on the server: