Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't import it as a module #238

Open
scarfacedeb opened this issue Jun 21, 2017 · 9 comments
Open

Can't import it as a module #238

scarfacedeb opened this issue Jun 21, 2017 · 9 comments
Assignees

Comments

@scarfacedeb
Copy link

It seems to be missing module definition in compiled and minified version.

Therefore I can't import it using import Custombox from 'custombox'.

Requiring custombox.ts with ts-loader brought a lot of other issues.

@scarfacedeb
Copy link
Author

Surprisingly, version 3.0.2 had the module definitions.

@dixso
Copy link
Owner

dixso commented Jun 22, 2017

Hi @scarfacedeb,
What do you want do exactly?

Reagards.

@dixso dixso self-assigned this Jun 22, 2017
@zeleniy
Copy link

zeleniy commented Sep 27, 2017

In console:

npm install custombox --save

In code:

import Custombox from 'custombox';

new Custombox.modal({
  content: {
    effect: 'fadein',
    target: '#popup'
  }
}).open();

And then finally in browser:

Uncaught TypeError: __WEBPACK_IMPORTED_MODULE_1_custombox___default.a.modal is not a constructor

@hqa11
Copy link

hqa11 commented Sep 8, 2018

@zeleniy the same to you,Have you solved this problem?Please help me..Thanks

@zeleniy
Copy link

zeleniy commented Sep 8, 2018

@hqa11 no, i used https://github.com/frontend-collective/react-image-lightbox instead of that tool

HeshamMeneisi added a commit to HeshamMeneisi/custombox that referenced this issue Mar 11, 2019
HeshamMeneisi added a commit to HeshamMeneisi/custombox that referenced this issue Mar 11, 2019
HeshamMeneisi added a commit to HeshamMeneisi/custombox that referenced this issue Mar 11, 2019
HeshamMeneisi added a commit to HeshamMeneisi/custombox that referenced this issue Mar 11, 2019
HeshamMeneisi added a commit to HeshamMeneisi/custombox that referenced this issue Mar 11, 2019
@HeshamMeneisi
Copy link

If someone has this issue with webpack. Use "yarn add https://github.com/HeshamMeneisi/custombox" until someone accepts the pull request.

@hunterInt
Copy link

Any update here?

1 similar comment
@gp0
Copy link

gp0 commented Feb 19, 2021

Any update here?

@hunterInt
Copy link

hunterInt commented Feb 20, 2021

@gp0 this is what I had to do:

require('./assets/vendor/custombox/dist/custombox.legacy.min.js');

PS commander keen is boss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants