onilabs / stratifiedjs

Oni StratifiedJS (previously Apollo)
http://onilabs.com/stratifiedjs
Other
231 stars 22 forks source link

require-prefix problem with main attr, and or <script type=...sjs></script> #16

Closed kevyworks closed 10 years ago

kevyworks commented 10 years ago

Hi, given below:

<script type="text/javascript" src="assets/vendor/onilabs/stratified.js" main="assets/frontend/bootstrap" require-prefix="oni"></script>

shows an error: Uncaught ReferenceError: require is not defined

I think the script should not error since the actual user script hasn't been loaded yet?

-- removing the main attr does not throw an exception though.

afri commented 10 years ago

Thanks for reporting - it looks like a bug in the sjs runtime. I'm looking into it.

afri commented 10 years ago

Fixed on master branch https://github.com/onilabs/stratifiedjs/commit/3c81e719dae148f2f8c77e3b6d5d905afc89089b

Thanks again for reporting!

kevyworks commented 10 years ago

No problem master Fritz! thanks