vasturiano / kapsule

Kapsule - A closure based Web Component library
MIT License
58 stars 13 forks source link

Webpack Build Issues with 1.14.3 #12

Closed tjhoff closed 1 year ago

tjhoff commented 1 year ago

Hello! We're using react-force-graph and ran into an issue with webpack build today during dependency updates due to the lodash-es/debounce update.

We're using webpack 5.78.0 and the recent update caused the following error:

ERROR in ./node_modules/kapsule/dist/kapsule.mjs 1:0-42
Module not found: Error: Can't resolve 'lodash-es/debounce' in '{project_path}/node_modules/kapsule/dist'
Did you mean 'debounce.js'?
BREAKING CHANGE: The request 'lodash-es/debounce' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
resolve 'lodash-es/debounce' in '{project_path}/node_modules/kapsule/dist'

Let me know if I can provide any more info or help fix, but we can use 1.14.1/2 without any issues.

We really appreciate the time that effort that goes into making these tools!

edit - could be due to webpack settings as well, I'm not enough of a webpack guru to tell whether that's true or not.

ChitKit commented 1 year ago

Hello! On our project, we faced a similar problem. There is no webpack on our project and its configuration is not possible now. This difficulty is very critical for our project. I would be very grateful if you tell me how to solve this problem!

bardouni commented 1 year ago

Same here

SBernaldo commented 1 year ago

Faced the same problem

vasturiano commented 1 year ago

Apologies for any issues.

This was due to the recent PR: https://github.com/vasturiano/kapsule/pull/11.

I have now reverted to the previous import format, which should fix the issues. Please upgrade to v1.14.4 of this package.