Skip to content

Commit

Permalink
perf(v2): reduce memory usage consumption (#1900)
Browse files Browse the repository at this point in the history
  • Loading branch information
endiliey authored and yangshun committed Oct 27, 2019
1 parent 01f4d9a commit 98679b5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 40 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

- Reduce memory usage consumption.
- Slightly adjust search icon position to be more aligned on small width device.
- Convert sitemap plugin to TypeScript.
- Significantly reduce main bundle size and initial HTML payload on production build. Generated JS files from webpack is also shorter in name.
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"react-router-dom": "^5.1.2",
"semver": "^6.3.0",
"shelljs": "^0.8.3",
"static-site-generator-webpack-plugin": "^3.4.2",
"@endiliey/static-site-generator-webpack-plugin": "^4.0.0",
"std-env": "^2.2.1",
"style-loader": "^1.0.0",
"terser-webpack-plugin": "^2.1.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus/src/webpack/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import path from 'path';
import StaticSiteGeneratorPlugin from 'static-site-generator-webpack-plugin';
import StaticSiteGeneratorPlugin from '@endiliey/static-site-generator-webpack-plugin';
import {Configuration} from 'webpack';
import merge from 'webpack-merge';

Expand Down
58 changes: 20 additions & 38 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,17 @@
dependencies:
loader-utils "^1.2.3"

"@endiliey/static-site-generator-webpack-plugin@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@endiliey/static-site-generator-webpack-plugin/-/static-site-generator-webpack-plugin-4.0.0.tgz#94bfe58fd83aeda355de797fcb5112adaca3a6b1"
integrity sha512-3MBqYCs30qk1OBRC697NqhGouYbs71D1B8hrk/AFJC6GwF2QaJOQZtA1JYAaGSe650sZ8r5ppRTtCRXepDWlng==
dependencies:
bluebird "^3.7.1"
cheerio "^0.22.0"
eval "^0.1.4"
url "^0.11.0"
webpack-sources "^1.4.3"

"@evocateur/libnpmaccess@^3.1.2":
version "3.1.2"
resolved "https://registry.yarnpkg.com/@evocateur/libnpmaccess/-/libnpmaccess-3.1.2.tgz#ecf7f6ce6b004e9f942b098d92200be4a4b1c845"
Expand Down Expand Up @@ -3867,15 +3878,10 @@ bluebird@3.0.5:
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.0.5.tgz#2ff9d07c9b3edb29d6d280fe07528365e7ecd392"
integrity sha1-L/nQfJs+2ynW0oD+B1KDZefs05I=

bluebird@^3.0.5, bluebird@^3.5.1, bluebird@^3.5.3:
version "3.5.4"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.4.tgz#d6cc661595de30d5b3af5fcedd3c0b3ef6ec5714"
integrity sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw==

bluebird@^3.5.5:
version "3.5.5"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f"
integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==
bluebird@^3.5.1, bluebird@^3.5.3, bluebird@^3.5.5, bluebird@^3.7.1:
version "3.7.1"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.1.tgz#df70e302b471d7473489acf26a93d63b53f874de"
integrity sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg==

bmp-js@^0.1.0:
version "0.1.0"
Expand Down Expand Up @@ -6562,10 +6568,10 @@ etag@~1.8.1:
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=

eval@^0.1.0:
version "0.1.3"
resolved "https://registry.yarnpkg.com/eval/-/eval-0.1.3.tgz#051deb8fa00580f452572580e3147f5d4a9bf5a5"
integrity sha512-lDBa3hl9YynB+3J7aNPaajAapr+7ZiAylqFeUmx/r9s7I0tkkUJFLw2CQ2oMRYGg/rL7g4IYkZenbKaQGKPnGQ==
eval@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/eval/-/eval-0.1.4.tgz#e05dbe0dab4b9330215cbb7bf4886eb24bd58700"
integrity sha512-npGsebJejyjMRnLdFu+T/97dnigqIU0Ov3IGrZ8ygd1v7RL1vGkEKtvyWZobqUH1AQgKlg0Yqqe2BtMA9/QZLw==
dependencies:
require-like ">= 0.1.1"

Expand Down Expand Up @@ -14625,11 +14631,6 @@ sort-keys@^2.0.0:
dependencies:
is-plain-obj "^1.0.0"

source-list-map@^1.1.1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-1.1.2.tgz#9889019d1024cce55cdc069498337ef6186a11a1"
integrity sha1-mIkBnRAkzOVc3AaUmDN+9hhqEaE=

source-list-map@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34"
Expand Down Expand Up @@ -14667,7 +14668,7 @@ source-map-url@^0.4.0:
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=

source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.3:
source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6:
version "0.5.7"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
Expand Down Expand Up @@ -14829,17 +14830,6 @@ static-extend@^0.1.1:
define-property "^0.2.5"
object-copy "^0.1.0"

static-site-generator-webpack-plugin@^3.4.2:
version "3.4.2"
resolved "https://registry.yarnpkg.com/static-site-generator-webpack-plugin/-/static-site-generator-webpack-plugin-3.4.2.tgz#ad9fd0a4fb8b6f439a7a66018320b459bdb6d916"
integrity sha512-39Kn+fZDVjolLYuX5y1rDvksJIW0QEUaEC/AVO/UewNXxGzoSQI1UYnRsL+ocAcN5Yti6d6rJgEL0qZ5tNXfdw==
dependencies:
bluebird "^3.0.5"
cheerio "^0.22.0"
eval "^0.1.0"
url "^0.11.0"
webpack-sources "^0.2.0"

"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@~1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
Expand Down Expand Up @@ -16291,14 +16281,6 @@ webpack-merge@^4.2.2:
dependencies:
lodash "^4.17.15"

webpack-sources@^0.2.0:
version "0.2.3"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-0.2.3.tgz#17c62bfaf13c707f9d02c479e0dcdde8380697fb"
integrity sha1-F8Yr+vE8cH+dAsR54Nzd6DgGl/s=
dependencies:
source-list-map "^1.1.1"
source-map "~0.5.3"

webpack-sources@^1.1.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.3.0.tgz#2a28dcb9f1f45fe960d8f1493252b5ee6530fa85"
Expand Down

0 comments on commit 98679b5

Please sign in to comment.