Closed hqwlkj closed 1 year ago
same problem
Same issue
"next": "13.4.0", "antd": "^4.24.8", "next-compose-plugins": "^2.2.1",
Same issue.
Hi all. I was able to repro this but unfortunately couldn't find a proper solution yet.
The monkeypatch is supposed to allow support for image URLs inside less files. E.g. background-image: url('./image.png')
.
Looks like Node is blocking writing into that module. something changed about Next.js transpilation in the recent version.
I tried using Object.defineProperty
, Reflect.set
, Reflect.defineProperty
but they either don't work (the property isn't applied) or the error mentioned is thrown.
This PR is not fixing it - obj = { ...obj, prop: 'val' }
doesn't mutate the object, but the intention is to mutate.
At this point, I see the following options:
url
support in less files (least favorite option)Module.prototype.require
(definitely not a fan of this but it might be the only option)I've created a discussion in nextjs to have this supported. Upvote this if you support my proposal.
same issue here
Released a fix in v3.0.0
Thank you!