When building a project by vite using basic react configuration postcss fails with:
Error (Logs|Stacks)
[Failed to load PostCSS config: Failed to load PostCSS config: [Error] Must use import to load ES Module: ./postcss.config.ts
require() of ES modules is not supported.
require() of ./postcss.config.ts from ./node_modules/vite/dist/node/chunks/dep-f7d05e3f.js is an ES module file as it is a .ts file whose nearest parent package.json contains "type": "module" which defines all .ts files in that package scope as ES modules.
Instead change the requiring code to use import(), or remove "type": "module" from ./package.json.
When I remove "type": "module" from package.json I get:
When building a project by vite using basic react configuration postcss fails with:
Error (Logs|Stacks)
When I remove "type": "module" from package.json I get:
Environment