forked from zulip/zulip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
webpack: Add css-hot-loader to remove flash on unstyled content.
This commit removes the flash on unstyled content while in dev mode that was caused by the use of style-loader. Instead it enables mini-css-extract-plugin in dev in combination with css-hot-loader which enables HMR for development. This is because mini-css-extract-plugin does not currently support HMR out of the box. It also adds a SourceMapDevtoolPlugin to enable sourcemaps with css since mini-css breaks sourcemaps when used in combination with the cheap-module-evel-source-map setting. Related issues: webpack-contrib/mini-css-extract-plugin#34 webpack-contrib/mini-css-extract-plugin#29
- Loading branch information
1 parent
985e373
commit fe87a86
Showing
3 changed files
with
30 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2054,6 +2054,14 @@ [email protected]: | |
version "0.0.4" | ||
resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" | ||
|
||
css-hot-loader@^1.3.9: | ||
version "1.3.9" | ||
resolved "https://registry.yarnpkg.com/css-hot-loader/-/css-hot-loader-1.3.9.tgz#ed22b41126920134a4a2246d7d32113e2425c754" | ||
dependencies: | ||
loader-utils "^1.1.0" | ||
lodash "^4.17.5" | ||
normalize-url "^1.9.1" | ||
|
||
[email protected]: | ||
version "0.28.11" | ||
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.11.tgz#c3f9864a700be2711bb5a2462b2389b1a392dab7" | ||
|
@@ -6282,7 +6290,7 @@ [email protected]: | |
query-string "^5.0.1" | ||
sort-keys "^2.0.0" | ||
|
||
normalize-url@^1.4.0: | ||
normalize-url@^1.4.0, normalize-url@^1.9.1: | ||
version "1.9.1" | ||
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" | ||
dependencies: | ||
|