Open kolpaja opened 1 year ago
I have exactly the same issue
I have exactly the same issue.
It run as expected for me! @kolpaja You can clone the following repo and run again!
@kiner-tang for some reason, when I copied package source to my project it works as expected, but when I try to run in from node_modules as suggested in documentation it produces empty css file.
@iliapir2 Can you provide a online reproduction or provide a minimal GitHub repository?
@kiner-tang i manualy added a version of ant.min.css and I don't see any improvements in my nextjs application, I will try to a simple demo projected later on and I will inform
It is because of the @ant-design/cssinjs
library. When upgrading to 1.4.x and more, the CSS output is entirely empty. When forcing the resolution to 1.3.x, everything is back to normal.
I also observed that the generated cache was empty, so the problem probably lies in cssinjs
, not in static-style-extract
when runing predev script to load the styles of antd.min.css empty
I am using nextjs with the help of the function import fs from 'fs'; import { extractStyle } from '@ant-design/static-style-extract'; // import { ConfigProvider } from "antd"; // import React from "react";
const outputPath = './public/antd.min.css';
const css = extractStyle();
console.log(css.length);
fs.writeFileSync(outputPath, css);
console.log(
🎉 Antd CSS generated at ${outputPath}
);and the CSS is not generated