LoginSignup
0
0

Error: Malformed PostCSS Configuration

Posted at

tailwind cssが効かなく,解決までに時間がかかったので共有します.

エラー

./src/app/globals.css.webpack[javascript/auto]...
Error: Malformed PostCSS Configuration
    at Array.forEach (<anonymous>)

結論

postcss.config.js
module.exports = { 
  plugins: [
    'tailwindcss',
    'autoprefixer',
    'postcss-import',
    'postcss-flexbugs-fixes',
  ]
}

pluginsの指定方法が間違っていて(バージョンで異なる?)エラーになっていました.

postcss.config.js
// 失敗例
module.exports = { 
  plugins: [
    require('tailwindcss'),
    require('autoprefixer'),
    require('postcss-import'),
    require('postcss-flexbugs-fixes'),
  ]
}

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0