-
-
Notifications
You must be signed in to change notification settings - Fork 760
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
Fail to build jimp with webpack@5 + ts-loader #1151
Comments
Oh we have a Babel plugin that adds the module exports. We should probably not do that for esm. If you want to test that that works I'll get the or merged asap |
Thanks so much, @hipstersmoothie! I can't promise but I'll try to test the change in 12-24 hours after it is available. |
I am having a similar issue with the browser file, it tells me
to the babel plugins helps with that problem, but since it transforms everything into CommonJS, it is probably not the right way to handle the ESM issue. I also tried switching Not sure whether any of this helps with the issue in the ESM version of Jimp, just wanted to leave my findings here so that the browser version can be fixed as well soon. |
* Disable Renovate automerge for jimp * (see also jimp-dev/jimp#1151)
* Disable Renovate automerge for jimp * (see also jimp-dev/jimp#1151)
I'll probably fix this later today |
If you could provide a reproduction repo that would be great though |
Sure! |
@hipstersmoothie next version should use vite |
Vite isn't actually a bundler so it doesn't really fit here. Vite uses rollup for bundling but I'm far better versed in webpack. Anyways this issue should be fixed with #1153 feel free to reopen if it isn't fixed |
It looks like #1149 (CC @hipstersmoothie) prevents
jimp
to be built with webpack@5 + ts-loader. Probably, it's because jimp now supports both ESM and CJS but something is misconfigured, preventing webpack or Typescript from handling import.Expected Behavior
Build successfully
Current Behavior
Build fails with
Failure Information (for bugs)
It seems like #1149 confuses
ts-loader
on how to handle Jimp. Downgrading to https://github.com/jimp-dev/jimp/releases/tag/v0.20.2 fixes the issue.Steps to Reproduce
Upgrading to https://github.com/jimp-dev/jimp/releases/tag/v0.21.0
Webpack config
Usage in TS code
Context
The text was updated successfully, but these errors were encountered: