Open IvanDimitrov2002 opened 4 years ago
Experiencing similar behaviour with antd
Similar issue with Semantic UI. This is my next.config.js:
const withSass = require('@zeit/next-sass');
const withCSS = require('@zeit/next-css');
const withPurgeCss = require('next-purgecss');
module.exports = withCSS(
withSass(
withPurgeCss({
target: 'serverless',
webpack(config) {
config.module.rules.push({
test: /\.(png|svg|eot|otf|ttf|woff|woff2)$/,
use: {
loader: 'url-loader'
}
});
return config;
}
})
)
);
So I've tested the plugin and it seems to work. The problem I face tho is that Purge cleans more than it needs to. When visiting different pages some styles are gone. For example the input fields are very ugly :D and some images are gone. My next.config.js:
My project structure is:
In Semantic-UI are located .less files that compile when nextjs dev server is on or when you run
next build
Thanks in advance