Screencast on Migrating from Meteor 1.2 to 1.3 with Tests

ES2015 module files are executed in strict mode. I think currently there is no way to turn this off (this would also mean you cannot use import/export). So you would need to change your code to fulfill the rules of strict mode.

For example you need to declare globals explicitly. Instead of later = function() { } you write global.later = function() { }. Also the “hack” to use this to reference the global scope is not working I think. I think it would be great if Meteor would alias global to window on the client side.

More about strict mode: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode#Changes_in_strict_mode

3 Likes

+1 to what Sanjo said. You just need to do window.foo or global.foo to expose the function properly. Although i’m pretty sure React = require('react') worked for me (no window or global namespace).

I’m using beta-4 and I didn’t have to install jquery, underscore, etc… (though those are in my packages list after upgrading).

For me it was just editing one file (browserify.js) and importing React from NPM instead of Atmosphere.