I'm using CKEditor (which brings some 3rd party css) and I have some css conflicts in module rules in webpack config.
module: {
rules: [
{
test: /ckeditor5-[^/\\]+[/\\]theme[/\\]icons[/\\][^/\\]+\.svg$/,
use: ['raw-loader']
},
{
test: /ckeditor5-[^/\\]+[/\\]theme[/\\].+\.css$/,
use: [
{
loader: 'style-loader',
options: {
injectType: 'singletonStyleTag',
attributes: {
'data-cke': true
}
}
},
'css-loader',
{
loader: 'postcss-loader',
options: {
postcssOptions: styles.getPostCssConfig({
themeImporter: {
themePath: require.resolve('@ckeditor/ckeditor5-theme-lark')
},
minify: true
})
}
},
]
},
{
test: /\.ts$/,
use: "ts-loader",
exclude: /node_modules/
},
{
test: /\.((c|sa|sc)ss)$/i,
use: [
// MiniCssExtractPlugin.loader,
'css-loader',
'postcss-loader',
'sass-loader'
],
exclude: /ckeditor5-[^/\\]+[/\\]theme[/\\].+\.css$/,
},
{
test: /\.js$/,
exclude: /node_modules/,
use: ['babel-loader'],
},
{
test: /\.(png|gif|jpe?g|svg)$/i,
type: 'asset',
parser: {
dataUrlCondition: {
maxSize: environment.limits.images,
},
},
generator: {
filename: 'images/design/[name].[hash:6][ext]',
},
exclude: /ckeditor5-[^/\\]+[/\\]theme[/\\]icons[/\\][^/\\]+\.svg$/,
},
{
test: /\.(eot|ttf|woff|woff2)$/,
type: 'asset',
parser: {
dataUrlCondition: {
maxSize: environment.limits.images,
},
},
generator: {
filename: 'images/design/[name].[hash:6][ext]',
},
},
],
},
Any ideas? As a last resort i would just like to disable the MiniCssExtractPlugin and have the styles work if there is no other good idea