DEV Community

loading...

Discussion on: Angular 10 with Tailwind CSS

Collapse
marcjulian profile image
Marc Stammerjohann Author

Hi looks like you are using postcss-loader in version 4.x. Update your webpack.config.js as follows

module.exports = {
  module: {
    rules: [
      {
        test: /\.scss$/,
        loader: 'postcss-loader',
        options: {
-          ident: 'postcss',
-          syntax: 'postcss-scss',
-          plugins: () => [
-            require('postcss-import'),
-            require('tailwindcss'),
-            require('autoprefixer'),
-          ],
+          postcssOptions: {
+           ident: 'postcss',
+            syntax: 'postcss-scss',
+            plugins: [
+              require('postcss-import'),
+              require('tailwindcss'),
+              require('autoprefixer'),
            ],
          },
        },
      },
    ],
  },
};
Enter fullscreen mode Exit fullscreen mode

The blog post has been updated to reflect the changes needed for postcss-loader 4.x