This repository has been archived by the owner on May 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 513
Wrong CSS rules order when the extract text plugin and multiple entry points are used #586
Comments
I had a similar issue using ETP 3.0.0 and Webpack ^3.4.1 and by setting the cache option to false I was able to side step this issue. Not the best fix but fixes watch mode for us. |
@sresant what cache option are we talking about? |
Also having this issue. |
Could fix it finally by switching to https://github.com/webpack-contrib/mini-css-extract-plugin |
@julmot PR welcome |
Seems related to #573 |
DEPRECATED |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have an issue with a combination of the extract text plugin, SASS loader and multiple entry points.
The issue is that the order of rules in output CSS is incorrect when I use multiple entry points and the extract text plugin. It's fine when I either disable the extract text plugin or build just one entry point at a time.
To reproduce
To reproduce the issue clone this branch: https://github.com/CKEditor5/ckeditor5.github.io/tree/webpack-bug.
And run:
And open
examples/editor-inline.html
in your browser. The problem manifests itself visually by the lack of padding in the link balloon (which you can open by the link button).In terms of code, the issue occurs because this line:
https://github.com/CKEditor5/ckeditor5.github.io/blob/webpack-bug/examples/build/editor-inline.css#L356
Is before this line:
https://github.com/CKEditor5/ckeditor5.github.io/blob/webpack-bug/examples/build/editor-inline.css#L665
No issue when just one entry point
To see that it works when just one entry point is built you can clone this branch: https://github.com/CKEditor5/ckeditor5.github.io/tree/webpack-nobug.
On this branch, the reset rules are here:
https://github.com/CKEditor5/ckeditor5.github.io/blob/webpack-nobug/examples/build/editor-inline.css#L294
And the form styles are here:
https://github.com/CKEditor5/ckeditor5.github.io/blob/webpack-nobug/examples/build/editor-inline.css#L1077
No issue when no extract text plugin
To see that it works without the extract text plugin: https://github.com/CKEditor5/ckeditor5.github.io/tree/webpack-nobug2.
Now the CSS is in this file and it's split into multiple modules so it's hard to figure out how the CSS is loaded by just looking at https://raw.githubusercontent.com/CKEditor5/ckeditor5.github.io/webpack-nobug2/examples/build/editor-inline.js
But anyway, it works in this case – the balloon has a proper padding which means that the rules are loaded in the correct order.
Env
Node: 6.9.1. MacOS: 10.12.14.
Additional information
I realise that this isn't a very minimal sample to reproduce the issue. There's lots of code in maaany repositories (fortunately, everything is public). But before I'll spend a couple of hours trying to reduce it, I'd like to at least know if you consider this a bug. And if so, what I could provide to make it simpler for you to debug it.
The text was updated successfully, but these errors were encountered: