mirror of https://github.com/zulip/zulip.git
dependencies: Upgrade mini-css-extract-plugin to 0.6.0 and use HMR.
Given mini-css-extract-plugin can now do hot module replacement, this commit also removed css-hot-loader. Not upgrading to 0.7.0 as that cause webpack to crash.
This commit is contained in:
parent
413c3066f0
commit
637b2b784a
|
@ -12,7 +12,6 @@
|
|||
"blueimp-md5": "2.10.0",
|
||||
"cache-loader": "4.0.0",
|
||||
"clipboard": "2.0.4",
|
||||
"css-hot-loader": "1.3.9",
|
||||
"css-loader": "2.1.1",
|
||||
"emoji-datasource-google": "4.0.4",
|
||||
"emoji-datasource-google-blob": "npm:emoji-datasource-google@3.0.0",
|
||||
|
@ -29,7 +28,7 @@
|
|||
"jquery-validation": "1.19.0",
|
||||
"katex": "0.10.2",
|
||||
"lazysizes": "5.1.0",
|
||||
"mini-css-extract-plugin": "0.4.0",
|
||||
"mini-css-extract-plugin": "0.6.0",
|
||||
"moment": "2.24.0",
|
||||
"moment-timezone": "0.5.25",
|
||||
"node-sass": "4.12.0",
|
||||
|
|
|
@ -9,16 +9,6 @@ import * as MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|||
|
||||
const assets = require('./webpack.assets.json');
|
||||
|
||||
// Adds on css-hot-loader in dev mode
|
||||
function getHotCSS(bundle: any[], isProd: boolean): any[] {
|
||||
if (isProd) {
|
||||
return bundle;
|
||||
}
|
||||
return [
|
||||
'css-hot-loader',
|
||||
].concat(bundle);
|
||||
}
|
||||
|
||||
export default (env?: string): webpack.Configuration => {
|
||||
const production: boolean = env === "production";
|
||||
const config: webpack.Configuration = {
|
||||
|
@ -47,8 +37,13 @@ export default (env?: string): webpack.Configuration => {
|
|||
// regular css files
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: getHotCSS([
|
||||
MiniCssExtractPlugin.loader,
|
||||
use: [
|
||||
{
|
||||
loader: MiniCssExtractPlugin.loader,
|
||||
options: {
|
||||
hmr: !production,
|
||||
},
|
||||
},
|
||||
cacheLoader,
|
||||
{
|
||||
loader: 'css-loader',
|
||||
|
@ -56,13 +51,18 @@ export default (env?: string): webpack.Configuration => {
|
|||
sourceMap: true,
|
||||
},
|
||||
},
|
||||
], production),
|
||||
],
|
||||
},
|
||||
// sass / scss loader
|
||||
{
|
||||
test: /\.(sass|scss)$/,
|
||||
use: getHotCSS([
|
||||
MiniCssExtractPlugin.loader,
|
||||
use: [
|
||||
{
|
||||
loader: MiniCssExtractPlugin.loader,
|
||||
options: {
|
||||
hmr: !production,
|
||||
},
|
||||
},
|
||||
cacheLoader,
|
||||
{
|
||||
loader: 'css-loader',
|
||||
|
@ -76,7 +76,7 @@ export default (env?: string): webpack.Configuration => {
|
|||
sourceMap: true,
|
||||
},
|
||||
},
|
||||
], production),
|
||||
],
|
||||
},
|
||||
// load fonts and files
|
||||
{
|
||||
|
|
|
@ -21,4 +21,4 @@ LATEST_RELEASE_ANNOUNCEMENT = "https://blog.zulip.org/2019/03/01/zulip-2-0-relea
|
|||
# Typically, adding a dependency only requires a minor version bump, and
|
||||
# removing a dependency requires a major version bump.
|
||||
|
||||
PROVISION_VERSION = '34.4'
|
||||
PROVISION_VERSION = '35.0'
|
||||
|
|
61
yarn.lock
61
yarn.lock
|
@ -2352,15 +2352,6 @@ css-global-keywords@^1.0.1:
|
|||
resolved "https://registry.yarnpkg.com/css-global-keywords/-/css-global-keywords-1.0.1.tgz#72a9aea72796d019b1d2a3252de4e5aaa37e4a69"
|
||||
integrity sha1-cqmupyeW0Bmx0qMlLeTlqqN+Smk=
|
||||
|
||||
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"
|
||||
integrity sha512-W3RoM3mqIhZyMr2sYJr7Q49gQa6C+W6IjXOcGg/bOcm5Fsbn4ElbMqSVwcCbZZhrSBfL5ZGGA6skJQVrXpbRnQ==
|
||||
dependencies:
|
||||
loader-utils "^1.1.0"
|
||||
lodash "^4.17.5"
|
||||
normalize-url "^1.9.1"
|
||||
|
||||
css-loader@2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-2.1.1.tgz#d8254f72e412bb2238bb44dd674ffbef497333ea"
|
||||
|
@ -6177,7 +6168,7 @@ lodash.unescape@4.0.1:
|
|||
resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c"
|
||||
integrity sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=
|
||||
|
||||
lodash@^4.0.0, lodash@^4.17.5, lodash@^4.6.1, lodash@~4.17.10:
|
||||
lodash@^4.0.0, lodash@^4.6.1, lodash@~4.17.10:
|
||||
version "4.17.10"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
|
||||
integrity sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==
|
||||
|
@ -6582,12 +6573,14 @@ mimic-fn@^2.0.0:
|
|||
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
|
||||
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
|
||||
|
||||
mini-css-extract-plugin@0.4.0:
|
||||
version "0.4.0"
|
||||
resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.0.tgz#ff3bf08bee96e618e177c16ca6131bfecef707f9"
|
||||
integrity sha512-2Zik6PhUZ/MbiboG6SDS9UTPL4XXy4qnyGjSdCIWRrr8xb6PwLtHE+AYOjkXJWdF0OG8vo/yrJ8CgS5WbMpzIg==
|
||||
mini-css-extract-plugin@0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.6.0.tgz#a3f13372d6fcde912f3ee4cd039665704801e3b9"
|
||||
integrity sha512-79q5P7YGI6rdnVyIAV4NXpBQJFWdkzJxCim3Kog4078fM0piAaFlwocqbejdWtLW1cEzCexPrh6EdyFsPgVdAw==
|
||||
dependencies:
|
||||
loader-utils "^1.1.0"
|
||||
normalize-url "^2.0.1"
|
||||
schema-utils "^1.0.0"
|
||||
webpack-sources "^1.1.0"
|
||||
|
||||
minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1:
|
||||
|
@ -7141,15 +7134,14 @@ normalize-svg-path@~0.1.0:
|
|||
resolved "https://registry.yarnpkg.com/normalize-svg-path/-/normalize-svg-path-0.1.0.tgz#456360e60ece75fbef7b5d7e160480e7ffd16fe5"
|
||||
integrity sha1-RWNg5g7Odfvve11+FgSA5//Rb+U=
|
||||
|
||||
normalize-url@^1.9.1:
|
||||
version "1.9.1"
|
||||
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c"
|
||||
integrity sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=
|
||||
normalize-url@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6"
|
||||
integrity sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==
|
||||
dependencies:
|
||||
object-assign "^4.0.1"
|
||||
prepend-http "^1.0.0"
|
||||
query-string "^4.1.0"
|
||||
sort-keys "^1.0.0"
|
||||
prepend-http "^2.0.0"
|
||||
query-string "^5.0.1"
|
||||
sort-keys "^2.0.0"
|
||||
|
||||
normals@^1.0.1:
|
||||
version "1.1.0"
|
||||
|
@ -8150,10 +8142,10 @@ prelude-ls@~1.1.2:
|
|||
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
|
||||
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
|
||||
|
||||
prepend-http@^1.0.0:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
|
||||
integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=
|
||||
prepend-http@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
|
||||
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
|
||||
|
||||
process-nextick-args@~1.0.6:
|
||||
version "1.0.7"
|
||||
|
@ -8308,11 +8300,12 @@ quat-slerp@^1.0.0:
|
|||
dependencies:
|
||||
gl-quat "^1.0.0"
|
||||
|
||||
query-string@^4.1.0:
|
||||
version "4.3.4"
|
||||
resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb"
|
||||
integrity sha1-u7aTucqRXCMlFbIosaArYJBD2+s=
|
||||
query-string@^5.0.1:
|
||||
version "5.1.1"
|
||||
resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb"
|
||||
integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==
|
||||
dependencies:
|
||||
decode-uri-component "^0.2.0"
|
||||
object-assign "^4.1.0"
|
||||
strict-uri-encode "^1.0.0"
|
||||
|
||||
|
@ -9504,10 +9497,10 @@ sort-desc@^0.1.1:
|
|||
resolved "https://registry.yarnpkg.com/sort-desc/-/sort-desc-0.1.1.tgz#198b8c0cdeb095c463341861e3925d4ee359a9ee"
|
||||
integrity sha1-GYuMDN6wlcRjNBhh45JdTuNZqe4=
|
||||
|
||||
sort-keys@^1.0.0:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad"
|
||||
integrity sha1-RBttTTRnmPG05J6JIK37oOVD+a0=
|
||||
sort-keys@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128"
|
||||
integrity sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=
|
||||
dependencies:
|
||||
is-plain-obj "^1.0.0"
|
||||
|
||||
|
|
Loading…
Reference in New Issue