Yarn Compile error with tailwind.config.js

I’d recommend keeping the .js extension and “use import instead” per the error message.

  1. Import the typography plugin at the top of the file using the ESM syntax:
import typography from '@tailwindcss/typography';
  1. Add the typography plugin to the plugins array in your config file:
module.exports = {
  // ...
  plugins: [
    // ...
    typography,
  ],
};
5 Likes