### Issue: PostCSS config file was using ES module syntax (export default) in a .js file without "type": "module" in package.json. **Warning Message:** "Module type of file is not specified and it doesn't parse as CommonJS. Reparsing as ES module because module syntax is detected. This incurs a performance overhead." ### Solution: Renamed `postcss.config.js` to `postcss.config.mjs`: - .mjs extension is automatically recognized as ES module - No need to modify package.json - Eliminates performance overhead warning - Cleaner, explicit ES module indication ### Changes: - **File renamed**: `postcss.config.js` → `postcss.config.mjs` - **Content unchanged**: Still uses ES module export syntax - **No package.json changes needed** ### Result: - ✅ PostCSS module parsing warning eliminated - ✅ Build still works correctly - ✅ Performance improved (no re-parsing) - ✅ Clear ES module indication 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
15 lines
215 B
JavaScript
15 lines
215 B
JavaScript
/**
|
|
* PostCSS 配置文件
|
|
* 使用 ES Module 格式 - 统一现代标准
|
|
*
|
|
* 参考: https://postcss.org/
|
|
*/
|
|
|
|
export default {
|
|
// 插件列表
|
|
plugins: {
|
|
autoprefixer: {},
|
|
tailwindcss: {},
|
|
},
|
|
}
|