Is it possible to use Onsen UI 2 in Meteor with React

Viewed 316

I am looking to test out the new beta Onsen UI 2 in Meteor. I tried creating a package using meteorhack and browserify.

https://onsen.io/2/

The steps I followed are:

add meteorhacks and browserify

meteor add meteorhacks:npm cosmos:browserify add onsenui to packages.json

{
   "onsenui" : "2.0.0-beta"
}

Add it to lib/app.browserify.js

 OnsenUi = require('onsenui/js/onsenui');

I then try running the application but just keep hitting the same issue.

W20160325-14:40:26.163(2)? (STDERR)                         throw(ex);
W20160325-14:40:26.163(2)? (STDERR)                               ^
W20160325-14:40:26.340(2)? (STDERR) ReferenceError: window is not defined
W20160325-14:40:26.340(2)? (STDERR)     at defineProperty (node_modules/onsenui/js/onsenui.js:6:1)
W20160325-14:40:26.340(2)? (STDERR)     at Object.<anonymous> (node_modules/onsenui/js/onsenui.js:175:1)
W20160325-14:40:26.340(2)? (STDERR)     at Object._process (node_modules/onsenui/js/onsenui.js:19919:1)
W20160325-14:40:26.340(2)? (STDERR)     at s (../../../../../../../.meteor/packages/cosmos_browserify/.0.10.0.1e53wt8++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/browser-pack/_prelude.js:1:1)

I was thinking that as this new version is React compatible and no longer requires Angular that this should be possible?

1 Answers
Related