I just created a new Vue app by running npm init vue@latest like specified in the official documentation. Then I tried adding Tailwind to my app by following the guide for Vue & Vite on their website. However, when opening the file tailwind.config.js I noticed that ESLint tells me that module is not defined and the module.exports syntax does not work.
Why is that and how can I fix it?
Edit: The default .eslintrc.cjs file that gets created by Vue looks like this:
/* eslint-env node */
require("@rushstack/eslint-patch/modern-module-resolution");
module.exports = {
root: true,
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/eslint-config-prettier",
],
parserOptions: {
ecmaVersion: "latest",
},
};
.eslintrc.jsin your question..eslintrc.cjsnot.jsfile. Is that the problem?