1

I can't compile my code anymore because I get this error in my console:

An unhandled exception occurred: addTailwindPlugin is not a function

I don't know what happened actually, but I looked into my webpack.config.js file and there's another error with ESLint: Parsing error: The keyword 'const' is reserved.

That's really weird. Here's the config:

const { addTailwindPlugin } = require("@ngneat/tailwind");
const tailwindConfig = require("./tailwind.config.js");

module.exports = (config) => {
  addTailwindPlugin({
    webpackConfig: config,
    tailwindConfig,
    patchComponentsStyles: true
  });
  return config;
};

1
  • This might be a version problem Commented May 30, 2021 at 22:32

1 Answer 1

2

I just ran into the same error. For me it was because I had upgraded my project to ngneat 7.0 and Angular 11.2, which has built-in support for tailwindcss:

https://github.com/angular/angular-cli/commit/73b409881f71a8235769a345356dcde3c568d0c3

I was able to resolve the error by removing the reference to the custom webpack.config.js from angular.json, since the tailwind plugin was the only customization that I had.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.