You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting an error: TypeError: Cannot add property _layers, object is not extensible
This is when the config is equal to [Module: null prototype] { } and I have passed a custom merger as well that is based of defu (also creates copy of objects using klona). I'm not 100% sure where the issue may be lying in this case.
Additional context
In the test fixture, I am trying to load tailwind.config.js that uses CommonJS syntax but it loadConfig / jiti doesn't seem to be picking that 🤔
It'll work if the extension is .cjs or the file uses ESM, but not all users may have that scenario.
Any chance you can prepare a minimal (c12 only) reproduction? 🙏🏼 (my guess is that it can be reproduced by using a natively imported .cjs config in a layer)
Hey sorry the stackblitz got updated! My workaround was to use extend: false in src/internal-context/load.ts. Let me also try to reproduce in an isolated usage
Environment
Reproduction
https://stackblitz.com/github/nuxt-modules/tailwindcss/tree/c12-refactor
Run
pnpm test basic
Describe the bug
Getting an error:
TypeError: Cannot add property _layers, object is not extensible
This is when the config is equal to
[Module: null prototype] { }
and I have passed a custom merger as well that is based ofdefu
(also creates copy of objects usingklona
). I'm not 100% sure where the issue may be lying in this case.Additional context
In the test fixture, I am trying to load
tailwind.config.js
that uses CommonJS syntax but itloadConfig
/ jiti doesn't seem to be picking that 🤔It'll work if the extension is
.cjs
or the file uses ESM, but not all users may have that scenario.Logs
The text was updated successfully, but these errors were encountered: