-
Notifications
You must be signed in to change notification settings - Fork 6
Resvg in next: using a function from multiple routes breaks the build #45
Comments
Hey @udatny, thank you for detailed reporting of this issue! I really appreciate your contribution. Unfortunately, I’m a bit swamped at the moment, but I’ll try to make some time in the next few days to look into this. I’ll keep you updated on the progress. |
+1, same issue here |
Hey @udatny, sorry for being late.
|
This might be related to #48, I'm closing this issue, try the 1.1.8 |
thank you very much for taking care of my issue. i tried once with the modified test regex as you proposed: test: /.+.node$/ig, so i searched further and got this hint here: thx/resvg-js#315 (comment) and by using this, i dont need any custom loader anymore and it works in all situations (e.g win/linux dev / build). |
Describe the bug
Once I reference a function using resvg more than once from a route, the next build fails.
Which version of Next.js? 14.2.5
Which version of nextjs-node-loader? 1.1.5
To Reproduce
Steps to reproduce the behavior or even better. Share me a link to repository with reproducable:
Dear amarjanica
I am using your loader to work with resvg in next (14.x). I encountered an issue and isolated it as good as possible. I am stuck there and asking for your support.
The issue is, that once I reference the function using resvg more than once, the build fails.
You can checkout my fork, go to the examples/next-14-resvg folder and reproduce the issue as follows:
npm install
npm run dev
o http://localhost:3000/api/render2d/sdfsfd
o http://localhost:3000/api/renderXd/sdfsfd
all is good up to here.
These two endpoints do actually exactly the same, just listen on a different path. Expectation is, that you get a 200
Error: Cannot find module './resvgjs.win32-x64-msvc.node'
randomly for one of the the api endpoints.
Since you seem to be familiar with webpack and loading and building I’d be happy if you could have a look into that.
Thanks.
The text was updated successfully, but these errors were encountered: