janmarkuslanger/tabby

How to use / import tabby with webpack? v3

juandinella opened this issue · 6 comments

How should import and use the lib with Webpack and ES6 Modules? I imported this way
import Tabby from 'tabsjs-lib/dist/tabby.iife'

But I get Uncaught TypeError: tabsjs_lib_dist_tabby_iife__WEBPACK_IMPORTED_MODULE_0___default.a.init is not a function

Thanks

Did you install tabby via npm?

Did you install tabby via npm?

Yes I did

If you install it via npm you can use tabby like this:

import { init } from 'tabsjs-lib';
init(); 

or like this

const Tabby = require('tabsjs-lib');
Tabby.init();

Let me know if this works for you. 🤔

@juandinella Is it working for you?

It's working perfect. Thanks!

Great if you like it feel free to share and like it! ⭐️