-
Notifications
You must be signed in to change notification settings - Fork 227
'require' not define, cannot import plugin to tailwind config #151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I may have found a fix, although I'm not sure if it is a fix or a bandaid: To specify environments in a configuration file, use the env key and specify which environments you want to enable by setting each to true. For example, the following enables the browser, es6 and Node.js environments: In your .eslintrc.js file ;
|
Hey, this is a project configuration thing — especially given that these errors are coming from ESLint. However, if you're in a Vite project I'd suggest using import formsPlugin from '@tailwindcss/forms'
/** @type {import('tailwindcss').Config} */
export default {
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
theme: {
extend: {},
},
plugins: [formsPlugin],
} |
@Pizle0210 did you change the file from |
Require() was failing with Node 23 on MacOS. See tailwindlabs/tailwindcss-forms#151 (comment)
Issue: Adding
|
What version of @tailwindcss/forms are you using?
10.2.3
What version of Node.js are you using?
v20.9.0
What browser are you using?
Edge
What operating system are you using?
Windows
Reproduction repository
https://github.com/vim-diesel/vite-eslint
Describe your issue
Attempting to import the plugin to tailwind.config.js throws an error:
The text was updated successfully, but these errors were encountered: