DEV Community

Discussion on: Angular 10 with Tailwind CSS

Collapse
 
thieugiatri4492 profile image
thieugiatri4492

I have this problem when i try to start the app. I follwo exactly all your instructions. Can you please help me? :
Alt text of image

Collapse
 
marcjulian profile image
Marc Stammerjohann

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