Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

Import an element on vue component, instead of globally.



  • Hi,

    I would like to avoid importing elements from esm in a file, and registering them globally (at main.js for example). Instead I would like to do something like:
    import VOnsInput from ‘vue-onsenui/esm/components/VOnsInput’;

    and at a Vue component: components: { VOnsInput, }

    I am globally only doing the following:

    import ‘onsenui/css/onsenui-core.css’;
    import VueOnsen from ‘vue-onsenui/esm’;

    Vue.use(VueOnsen);

    However, this doesn’t seem to work. Anyone has any suggestions?