romainberger / webpack-rtl-plugin

Webpack plugin to produce a rtl css bundle
MIT License
47 stars 33 forks source link

rtl plugin minifies source css #18

Open szkrd opened 6 years ago

szkrd commented 6 years ago

I might be wrong, but it seems to me that the plugin minifes both files (the original and the rtlified version). Is this the desired behaviour?

bimah commented 6 years ago

I am encountering the same issue. It seems like the plugin modify the original file too changing all the z-index properties.

The only workaround I could find is setting the minify: false, on the rtl-plugin new WebpackRTLPlugin({ minify: false })

szkrd commented 6 years ago

Yes, we never needed minify and it took us by surprise that the default is on (we minify stuff in our own pipeline). In fact since cssnano (unless configured differently) will modify keyframe names and this totally broke our css outputs...

Abdelhady commented 5 years ago

Minification could be helpful in general, except for what happens with z-index by cssnano. For me, I'm only disabling the overriding of the z-index like this:

new WebpackRTLPlugin({
    minify: {// Very important option to be passed to "cssnano" or it will override all z-index to be only '3' !
        zindex: false
    }
})
saschask commented 4 years ago

Are there any updates on this? It seems like there are several problems with the webpack integration of this plugin. For example, I cannot imagine that it is expected behavior that the source file is manipulated (minified) by the RTL plugin. In addition, also source-maps are not working (see: https://github.com/romainberger/webpack-rtl-plugin/issues/25). Thanks for any feedback.