What version of Tailwind CSS are you using?
v3.4.16
What build tool (or framework if it abstracts the build tool) are you using?
tailwind cli
What version of Node.js are you using?
v22.12.0
v23.*
What browser are you using?
N/A
What operating system are you using?
Windows
Reproduction URL
N/A
Describe your issue
It seems module resolution changed in Node 22.12.0 (as well as v23) and now tailwind no longer loads plugins. The only one I'm using is @tailwindcss/forms and with Node v22.11.0 it's included in the output, but with v22.12.0 or v23.* it's not.
My package.json is set to type": "module" and my config is named tailwind.config.js.
I can resolve this issue two different ways:
-
Rename my config to use .mjs
-
Pass the --no-experimental-require-module flag when calling tailwind like so
NODE_OPTIONS=\"--no-experimental-require-module\" tailwindcss -i ./Styles/base.css --postcss -o ./wwwroot/css/site.css
ref: nodejs/node#55085
ref: nodejs/node#56155
What version of Tailwind CSS are you using?
v3.4.16
What build tool (or framework if it abstracts the build tool) are you using?
tailwind cli
What version of Node.js are you using?
v22.12.0
v23.*
What browser are you using?
N/A
What operating system are you using?
Windows
Reproduction URL
N/A
Describe your issue
It seems module resolution changed in Node 22.12.0 (as well as v23) and now tailwind no longer loads plugins. The only one I'm using is
@tailwindcss/formsand with Node v22.11.0 it's included in the output, but with v22.12.0 or v23.* it's not.My
package.jsonis set totype": "module"and my config is namedtailwind.config.js.I can resolve this issue two different ways:
Rename my config to use
.mjsPass the
--no-experimental-require-moduleflag when calling tailwind like soNODE_OPTIONS=\"--no-experimental-require-module\" tailwindcss -i ./Styles/base.css --postcss -o ./wwwroot/css/site.cssref: nodejs/node#55085
ref: nodejs/node#56155