Closed nike1v closed 1 year ago
I added an example for Next 13.3.1 https://github.com/elado/next-with-less/tree/main/examples/next13.3.1 and it works. Can you elaborate on what's broken?
can confirm
It throws error - Failed to load next.config.mjs, see more info here https://nextjs.org/docs/messages/next-config-error TypeError: Cannot set property regexLikeCss of #<Object> which has only a getter
in the 13.3.1 release
I added an example for Next 13.3.1 https://github.com/elado/next-with-less/tree/main/examples/next13.3.1 and it works. Can you elaborate on what's broken?
HI! I just tried your examples, and it does work in this case. But if you try to use your package as an installed one from npm, but nut from ../../src, it will fail with the error I provieded. Please check it.
@elado Please take a look at this.
I've made some experiments here. Found it hard to set the value.
In next 13
it export that value here
And after Webpack compiles this module, that value is exported as a Get-Only property. Which is impossible to redefine. Quite frustrating. I guess better make NextJS enable its customization by creating PRs.
Hi all. I was able to repro this but unfortunately couldn't find a proper solution yet.
This PR is not fixing it - obj = { ...obj, prop: 'val' }
doesn't mutate the object, but the intention is to mutate.
Closing this PR and we can continue the discussion here: https://github.com/elado/next-with-less/issues/34
Update injection of less regexp tp work in Next@13.3+ Since they changed the way it works, you need to extend the object insted just replacing the value,