Coder Social home page Coder Social logo

Reduce package size about boostnote-app HOT 2 CLOSED

boostio avatar boostio commented on May 4, 2024
Reduce package size

from boostnote-app.

Comments (2)

Sarah-Seo avatar Sarah-Seo commented on May 4, 2024

Uglifying doesn't seem to be effective. File size is not reduced so much. 😭
So, I'm going to compile whole browser libraries for production build.

from boostnote-app.

Sarah-Seo avatar Sarah-Seo commented on May 4, 2024

Compiling whole library quite work well. But, the bundle size is still about 5mb. I think I could reduce much more.

Btw, I added analyze script to check bundle size much easier.

Analyze result

lodash: 532.7 KB (12.4%)
react-dom: 506.05 KB (11.8%)
moment: 429.12 KB (10.0%)
react-desktop: 421.4 KB (9.84%)
pouchdb-browser: 311.69 KB (7.28%)
  debug: 8.07 KB (2.59%)
  <self>: 303.62 KB (97.4%)
katex: 271.09 KB (6.33%)
styled-components: 219.23 KB (5.12%)
immutable: 139.14 KB (3.25%)
remark-parse: 128.18 KB (2.99%)
  xtend: 384 B (0.293%)
  <self>: 127.8 KB (99.7%)
react: 104.12 KB (2.43%)
react-router: 86.92 KB (2.03%)
octicons: 75.92 KB (1.77%)
radium: 62.26 KB (1.45%)
node-libs-browser: 52.77 KB (1.23%)
  buffer: 47.47 KB (90.0%)
  process: 5.17 KB (9.81%)
  <self>: 132 B (0.244%)
remark-stringify: 50.14 KB (1.17%)
  xtend: 384 B (0.748%)
  <self>: 49.77 KB (99.3%)
history: 46.35 KB (1.08%)
sander: 46.28 KB (1.08%)
  es6-promise: 27.77 KB (60.0%)
  <self>: 18.5 KB (40.0%)
inline-style-prefixer: 37.73 KB (0.881%)
glob: 36.79 KB (0.859%)
character-entities: 35.99 KB (0.841%)
node-emoji: 29.79 KB (0.696%)
fbjs: 29.05 KB (0.679%)
minimatch: 24.75 KB (0.578%)
spark-md5: 22.42 KB (0.524%)
redux: 20.35 KB (0.475%)
react-redux: 19.37 KB (0.452%)
graceful-fs: 18.42 KB (0.430%)
inline-style-prefix-all: 17.99 KB (0.420%)
hast-util-to-html: 17.72 KB (0.414%)
  xtend: 384 B (2.12%)
  <self>: 17.34 KB (97.9%)
bowser: 16.56 KB (0.387%)
unified: 15.4 KB (0.360%)
mdast-util-to-hast: 14.83 KB (0.346%)
  xtend: 384 B (2.53%)
  <self>: 14.46 KB (97.5%)
parse-entities: 12.94 KB (0.302%)
react-router-redux: 10.93 KB (0.255%)
hast-util-sanitize: 10.15 KB (0.237%)
  xtend: 384 B (3.70%)
  <self>: 9.77 KB (96.3%)
react-immutable-proptypes: 9.87 KB (0.231%)
fs.realpath: 9.62 KB (0.225%)
rimraf: 8.15 KB (0.190%)
property-information: 8.11 KB (0.189%)
vfile: 6.71 KB (0.157%)
lie: 5.76 KB (0.135%)
lodash-es: 5.74 KB (0.134%)
markdown-table: 5.46 KB (0.128%)
brace-expansion: 4.68 KB (0.109%)
vuvuzela: 4.53 KB (0.106%)
react-hot-loader: 3.95 KB (0.0922%)
character-entities-html4: 3.62 KB (0.0845%)
trough: 3.51 KB (0.0819%)
stringify-entities: 3.27 KB (0.0763%)
base64-js: 3.24 KB (0.0757%)
emoji-regex: 2.85 KB (0.0666%)
vfile-location: 2.74 KB (0.0641%)
ms: 2.65 KB (0.0620%)
unist-util-is: 2.64 KB (0.0618%)
mkdirp: 2.57 KB (0.0600%)
strip-markdown: 2.43 KB (0.0567%)
rubber-band-effect: 2.41 KB (0.0564%)
extend: 2.21 KB (0.0517%)
query-string: 2.01 KB (0.0469%)
ieee754: 2.01 KB (0.0469%)
object-assign: 1.95 KB (0.0455%)
immediate: 1.84 KB (0.0430%)
comma-separated-tokens: 1.77 KB (0.0413%)
warning: 1.76 KB (0.0412%)
unherit: 1.7 KB (0.0397%)
  xtend: 384 B (22.1%)
  <self>: 1.32 KB (77.9%)
mdast-util-compact: 1.7 KB (0.0396%)
string.prototype.codepointat: 1.6 KB (0.0374%)
character-entities-legacy: 1.56 KB (0.0364%)
function-bind: 1.49 KB (0.0348%)
invariant: 1.48 KB (0.0346%)
remark-html: 1.46 KB (0.0341%)
  xtend: 384 B (25.7%)
  <self>: 1.09 KB (74.3%)
array-iterate: 1.45 KB (0.0338%)
hoist-non-react-statics: 1.35 KB (0.0316%)
inflight: 1.33 KB (0.0311%)
hast-util-is-element: 1.28 KB (0.0300%)
match-at: 1.28 KB (0.0299%)
detab: 1.26 KB (0.0293%)
github-slugger: 1.24 KB (0.0289%)
remark-slug: 1.22 KB (0.0284%)
repeat-string: 1.18 KB (0.0277%)
filenamify: 1.17 KB (0.0274%)
mdast-util-definitions: 1.15 KB (0.0269%)
balanced-match: 1.13 KB (0.0265%)
symbol-observable: 1.12 KB (0.0263%)
webpack: 1.11 KB (0.0260%)
unist-util-visit: 1009 B (0.0230%)
mdast-util-to-string: 989 B (0.0226%)
markdown-escapes: 971 B (0.0222%)
hast-util-whitespace: 954 B (0.0218%)
once: 935 B (0.0213%)
state-toggle: 930 B (0.0212%)
ccount: 923 B (0.0211%)
wrappy: 905 B (0.0206%)
unist-util-stringify-position: 892 B (0.0203%)
exenv: 863 B (0.0197%)
unist-util-modify-children: 829 B (0.0189%)
is-hexadecimal: 739 B (0.0169%)
is-whitespace-character: 725 B (0.0165%)
is-buffer: 717 B (0.0164%)
unist-util-remove-position: 710 B (0.0162%)
is-word-character: 706 B (0.0161%)
longest-streak: 706 B (0.0161%)
is-alphabetical: 683 B (0.0156%)
is-alphanumerical: 677 B (0.0154%)
inherits: 672 B (0.0153%)
path-is-absolute: 611 B (0.0139%)
collapse-white-space: 610 B (0.0139%)
is-decimal: 606 B (0.0138%)
remark-emoji: 586 B (0.0134%)
bail: 555 B (0.0127%)
scope-eval: 542 B (0.0124%)
redux-thunk: 529 B (0.0121%)
unist-util-position: 514 B (0.0117%)
html-void-elements: 509 B (0.0116%)
unist-util-generated: 504 B (0.0115%)
unist-builder: 453 B (0.0103%)
kebab-case: 412 B (0.00940%)
remark: 386 B (0.00881%)
space-separated-tokens: 384 B (0.00876%)
character-reference-invalid: 382 B (0.00871%)
concat-map: 345 B (0.00787%)
replace-ext: 338 B (0.00771%)
argsarray: 338 B (0.00771%)
trim-repeated: 320 B (0.00730%)
strip-outer: 306 B (0.00698%)
trim-trailing-lines: 304 B (0.00693%)
normalize-uri: 296 B (0.00675%)
trim: 234 B (0.00534%)
escape-string-regexp: 226 B (0.00516%)
is-alphanumeric: 186 B (0.00424%)
strict-uri-encode: 182 B (0.00415%)
trim-lines: 169 B (0.00386%)
x-is-string: 148 B (0.00338%)
has: 114 B (0.00260%)
filename-reserved-regex: 74 B (0.00169%)
<self>: 233.04 KB (5.44%)

from boostnote-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.