Как удалить лишние моментные сценарии из моего пакета веб-пакетов? - PullRequest
0 голосов
/ 04 января 2019

Я использую веб-пакет для комплектации. Когда я анализирую размер пакета, в нем слишком много моментальных сценариев. Кажется, что главный виновник - antd, но есть и другие пакеты, которые используют несколько копий момента. Как удалить несколько моментальных копий?

antd: 1.25 MB (14.6%)
  moment: 528.4 KB (41.2%)
  lodash: 94.88 KB (7.40%)
  rc-animate: 35.49 KB (2.77%)
    css-animation: 6.56 KB (18.5%)
    <self>: 28.92 KB (81.5%)
  css-animation: 7.93 KB (0.619%)
  warning: 1.73 KB (0.135%)
  <self>: 613.5 KB (47.9%)
rc-calendar: 639.87 KB (7.29%)
  moment: 528.4 KB (82.6%)
  <self>: 111.47 KB (17.4%)
@firebase/database: 618.46 KB (7.05%)
rc-time-picker: 566.29 KB (6.46%)
  moment: 528.4 KB (93.3%)
  <self>: 37.89 KB (6.69%)
@ant-design/icons: 517.37 KB (5.90%)
draft-js: 499.06 KB (5.69%)
  immutable: 139.19 KB (27.9%)
  <self>: 359.88 KB (72.1%)
moment: 471.96 KB (5.38%)
rc-tree-select: 155.42 KB (1.77%)
  rc-animate: 35.06 KB (22.6%)
  rc-trigger: 34.13 KB (22.0%)
  warning: 1.76 KB (1.13%)
  <self>: 84.48 KB (54.4%)
lodash: 146.09 KB (1.67%)
@firebase/auth: 142.1 KB (1.62%)
immutable: 139.01 KB (1.58%)
@firebase/storage: 124.65 KB (1.42%)
react-dom: 93.53 KB (1.07%)
rc-tree: 90.76 KB (1.03%)
  rc-animate: 35.29 KB (38.9%)
  <self>: 55.48 KB (61.1%)
@firebase/messaging: 85.48 KB (0.974%)
fbjs: 81.78 KB (0.932%)
react-slick: 80.72 KB (0.920%)
rc-form: 80.44 KB (0.917%)
  lodash: 40.18 KB (50.0%)
  hoist-non-react-statics: 2.02 KB (2.52%)
  <self>: 38.24 KB (47.5%)
rc-editor-core: 75.67 KB (0.863%)
  lodash: 34.71 KB (45.9%)
  <self>: 40.97 KB (54.1%)
rc-table: 75.56 KB (0.861%)
connected-react-router: 69.07 KB (0.787%)
rc-select: 66.07 KB (0.753%)
  warning: 1.73 KB (2.62%)
  <self>: 64.34 KB (97.4%)
@firebase/util: 62.28 KB (0.710%)
rc-menu: 59.85 KB (0.682%)
d3-shape: 54.26 KB (0.619%)
ua-parser-js: 49.55 KB (0.565%)
react-router: 47.27 KB (0.539%)
  path-to-regexp: 10.56 KB (22.3%)
  prop-types: 2.7 KB (5.71%)
  warning: 1.76 KB (3.72%)
  isarray: 120 B (0.248%)
  <self>: 32.14 KB (68.0%)
rc-slider: 46.38 KB (0.529%)
core-js: 42.92 KB (0.489%)
react-move: 42.21 KB (0.481%)
  d3-interpolate: 15.65 KB (37.1%)
  <self>: 26.56 KB (62.9%)
rc-tabs: 41.79 KB (0.476%)
react-redux: 38.78 KB (0.442%)
  invariant: 1.36 KB (3.52%)
  <self>: 37.42 KB (96.5%)
axios: 36.23 KB (0.413%)
tinycolor2: 35.84 KB (0.409%)
object-hash: 35.35 KB (0.403%)
rc-editor-mention: 35.23 KB (0.402%)
dom-align: 35.23 KB (0.402%)
async-validator: 34.9 KB (0.398%)
rc-trigger: 34.04 KB (0.388%)
history: 33.28 KB (0.379%)
  invariant: 1.36 KB (4.10%)
  <self>: 31.92 KB (95.9%)
create-react-class: 29.82 KB (0.340%)
resize-observer-polyfill: 29.12 KB (0.332%)
rc-upload: 27.85 KB (0.318%)
  warning: 1.76 KB (6.34%)
  <self>: 26.09 KB (93.7%)
rc-pagination: 26.41 KB (0.301%)
rc-input-number: 25.94 KB (0.296%)
d3-scale: 25.29 KB (0.288%)
rc-cascader: 23.96 KB (0.273%)
  warning: 1.76 KB (7.34%)
  array-tree-filter: 563 B (2.29%)
  <self>: 21.65 KB (90.4%)
rc-drawer: 22.57 KB (0.257%)
redux: 20.61 KB (0.235%)
react-router-dom: 18.51 KB (0.211%)
  prop-types: 2.7 KB (14.6%)
  warning: 1.76 KB (9.50%)
  <self>: 14.06 KB (75.9%)
d3-time-format: 18.39 KB (0.210%)
qs: 17.83 KB (0.203%)
rc-dialog: 17.73 KB (0.202%)
rc-collapse: 17.58 KB (0.200%)
rc-animate: 17.12 KB (0.195%)
dom-scroll-into-view: 16.9 KB (0.193%)
rc-util: 16.54 KB (0.189%)
  shallowequal: 1.16 KB (6.99%)
  <self>: 15.39 KB (93.0%)
d3-interpolate: 15.29 KB (0.174%)
d3-array: 14.8 KB (0.169%)
d3-color: 14.52 KB (0.166%)
@firebase/app: 13.78 KB (0.157%)
lodash.throttle: 13 KB (0.148%)
rc-rate: 12.81 KB (0.146%)
mini-store: 12.56 KB (0.143%)
  hoist-non-react-statics: 2.02 KB (16.1%)
  <self>: 10.54 KB (83.9%)
d3-time: 12.19 KB (0.139%)
rc-steps: 12.11 KB (0.138%)
d3-format: 11.37 KB (0.130%)
lodash.debounce: 10.53 KB (0.120%)
redux-logger: 10.27 KB (0.117%)
react-lazy-load: 10.03 KB (0.114%)
add-dom-event-listener: 9.6 KB (0.109%)
immutability-helper: 9.34 KB (0.107%)
  invariant: 1.48 KB (15.8%)
  <self>: 7.86 KB (84.2%)
rc-progress: 9.26 KB (0.106%)
babel-runtime: 9.09 KB (0.104%)
rc-notification: 8.91 KB (0.102%)
enquire.js: 8.49 KB (0.0968%)
tslib: 8.2 KB (0.0935%)
rc-dropdown: 8.04 KB (0.0916%)
js-base64: 7.97 KB (0.0908%)
rc-tooltip: 7.76 KB (0.0885%)
@ant-design/icons-react: 7.74 KB (0.0882%)
create-react-context: 7.08 KB (0.0807%)
@firebase/logger: 6.72 KB (0.0766%)
@firebase/polyfill: 6.62 KB (0.0754%)
css-animation: 6.56 KB (0.0748%)
lodash.keys: 6.46 KB (0.0737%)
setimmediate: 6.32 KB (0.0721%)
rc-align: 6.18 KB (0.0705%)
react: 6.17 KB (0.0703%)
react-lifecycles-compat: 5.91 KB (0.0673%)
react-icons: 5.83 KB (0.0665%)
file-saver: 5.83 KB (0.0664%)
lodash-es: 5.74 KB (0.0654%)
promise-polyfill: 5.71 KB (0.0651%)
lodash.isarguments: 5.58 KB (0.0636%)
d3-ease: 5.46 KB (0.0623%)
d3-collection: 5.3 KB (0.0604%)
process: 5.29 KB (0.0603%)
lodash.isarray: 5.04 KB (0.0575%)
rc-checkbox: 4.98 KB (0.0568%)
rc-switch: 4.89 KB (0.0558%)
d3-path: 4.12 KB (0.0470%)
rmc-feedback: 3.86 KB (0.0440%)
firebase: 3.85 KB (0.0438%)
lodash._getnative: 3.78 KB (0.0431%)
d3-timer: 3.64 KB (0.0414%)
mutationobserver-shim: 3.61 KB (0.0411%)
ant-design-palettes: 3.39 KB (0.0386%)
schedule: 3.38 KB (0.0385%)
component-classes: 3.29 KB (0.0375%)
prop-types: 2.67 KB (0.0305%)
css-loader: 2.64 KB (0.0301%)
hoist-non-react-statics: 2.54 KB (0.0290%)
react-icon-base: 2.23 KB (0.0255%)
object-assign: 2.06 KB (0.0235%)
timers-browserify: 1.97 KB (0.0225%)
raf: 1.89 KB (0.0215%)
warning: 1.76 KB (0.0201%)
resolve-pathname: 1.75 KB (0.0200%)
webpack: 1.75 KB (0.0200%)
react-hot-loader: 1.5 KB (0.0171%)
invariant: 1.36 KB (0.0156%)
classnames: 1.17 KB (0.0133%)
json2mq: 1.13 KB (0.0129%)
value-equal: 1.11 KB (0.0126%)
performance-now: 1.04 KB (0.0118%)
dom-matches: 1007 B (0.0112%)
shallowequal: 979 B (0.0109%)
email-validator: 869 B (0.00967%)
array-tree-filter: 865 B (0.00963%)
symbol-observable: 736 B (0.00819%)
is-buffer: 698 B (0.00777%)
eventlistener: 639 B (0.00711%)
redux-thunk: 529 B (0.00589%)
dom-closest: 478 B (0.00532%)
shallow-equal: 296 B (0.00330%)
omit.js: 269 B (0.00299%)
intersperse: 259 B (0.00288%)
string-convert: 216 B (0.00240%)
component-indexof: 175 B (0.00195%)
gud: 139 B (0.00155%)
is-negative-zero: 122 B (0.00136%)
<self>: 1.06 MB (12.4%)
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...