Monaca Onsen UI Discord Chat Github Repo

Is it possible to use Require.js in Onsen ?

  • hi,
    I like to use Require.js in my app. is it possible to use it ?

  • @meisam3322 @IliaSky answered you here:

    It shouldn’t be a problem to use require.js in an Onsen UI project. Onsen UI is just a library after all.

    Just note that Onsen UI includes not only javascript, but also css styles, which you will need to add in order for it to work.

    If all else fails you can also just load Onsen UI via a script tag and then use require.js for the rest of the project.

    Anyway it should be possible - if you run into any trouble feel free to make a question about the specific problem at hand. :)

  • Hi, maybe I’m too late but I found this solution.
    create an AMD module like this (named onseninit.js)


    window.setImmediate = window.setTimeout;


    then in your config file put something like this

    baseUrl: ’ ',
    onseninit : ‘/path/onseninit’,
    onsen: ‘/path/onsenui.min’
    deps: [‘onseninit’],
    exports: ‘ons’




    It seems to work fine…