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

webpack support #53

Open
kleinph opened this issue Aug 24, 2017 · 3 comments
Open

webpack support #53

kleinph opened this issue Aug 24, 2017 · 3 comments

Comments

@kleinph
Copy link

kleinph commented Aug 24, 2017

If I try to import AngularStompDK with import AngularStompDK from 'AngularStompDK';, I get the following error message:

Uncaught Error: Cannot find module "."
    at webpackMissingModule (angular-stomp.min.js:1)
    at angular-stomp.min.js:1
    at Object.<anonymous> (angular-stomp.min.js:1)
    at Object.module.exports.import (angular-stomp.min.js:2)
    at __webpack_require__ (bootstrap 319d65adb53f8f2ff734:54)
    at Object.h (index.js:1)
    at __webpack_require__ (bootstrap 319d65adb53f8f2ff734:54)
    at Object.<anonymous> (shot.module.js:3)
    at __webpack_require__ (bootstrap 319d65adb53f8f2ff734:54)
    at Object.<anonymous> (main.bundle.js?319d65adb53f8f2ff734:107)

If I try it with the ES 2015 module (import ngStomp from 'AngularStompDK/core/ngStomp';), I get:

libs.bundle.js?73ff7fcae564d1fff95c:128584 Uncaught Error: Cannot find module "stompjs"
    at Object.<anonymous> (libs.bundle.js?73ff7fcae564d1fff95c:128584)
    at __webpack_require__ (bootstrap 73ff7fcae564d1fff95c:54)
    at Object.<anonymous> (shot.module.js:3)
    at __webpack_require__ (bootstrap 73ff7fcae564d1fff95c:54)
    at Object.<anonymous> (main.bundle.js?73ff7fcae564d1fff95c:107)
    at __webpack_require__ (bootstrap 73ff7fcae564d1fff95c:54)
    at Object.Array.concat.map../log (main.bundle.js?73ff7fcae564d1fff95c:6)
    at __webpack_require__ (bootstrap 73ff7fcae564d1fff95c:54)
    at webpackJsonpCallback (bootstrap 73ff7fcae564d1fff95c:25)
    at main.bundle.js?73ff7fcae564d1fff95c:1

So is it possible to also add support for Webpack?

@davinkevin
Copy link
Owner

davinkevin commented Aug 24, 2017

I'm really interested to add Webpack support... but I don't work a lot with it, so I will have to discover everything about it to find the origin of the problem.

But, if you know more, you can try to use a fork version of the lib with some modification to see if it works better and then do a PR.

The error message seems to be about the default import used in the lib. Maybe using a named import could work.

Thanks for your help

@chetbis
Copy link

chetbis commented Apr 8, 2018

Same here

@davinkevin
Copy link
Owner

@chetbis and @kleinph : Could you test to fork the project and try to change the default import in order to see if this is the origin of the fix.

I don't have any project with this setup (webpack & co), so I can't reproduce the problem... if you can provide an empty project with your config to help me reproduce the bug, it would help...

Thanks

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

3 participants