npm package: @liuli-util/vite-plugin-chunk-node-modules
Description: An interesting idea, to bundle all node_modules into separate chunks, making it easier to debug code after deployment. The inspiration comes from <https://github.com/Jack-Works>.
Latest version: 0.1.1

# vite-plugin-chunk-node-modules

An interesting idea, to bundle all node_modules into separate chunks, making it easier to debug code after deployment. The inspiration comes from <https://github.com/Jack-Works>.

## Usage

```js
// vite.config.js
import { defineConfig } from 'vite'
import { chunk } from '@liuli-util/vite-plugin-chunk-node-modules'

export default defineConfig({
  plugins: [chunk()],
})
```

You will get very fragmented chunks. Below is the chunk list from another one of my projects:

```sh
@ant-design
@babel
@ctrl
@liuli-util
@remix-run
@xobotyi
antd.42db6bc7.js
antd.227a23ec.css
async-validator.e56392a6.js
bail.2d65b3d4.js
ccount.1cb94a01.js
classnames.fcae7549.js
comlink.2466bcbe.js
comma-separated-tokens.09eb054d.js
compute-scroll-into-view.9b2bf0c9.js
copy-to-clipboard.04c46956.js
decode-named-character-reference.0cf99f69.js
decode-uri-component.ca13c355.js
dom-align.6f4926e0.js
escape-string-regexp.cd3f5550.js
extend.9f70b7a3.js
fast-deep-equal.3d5527c8.js
fast-shallow-equal.295b0047.js
favicon.47db6e0c.svg
filter-obj.a2c77fe2.js
hast-util-whitespace.a4a4a501.js
history.c39af881.js
i18next.4cf220a7.js
immer.616ba876.js
index.0d33c228.css
index.85f7a7fa.js
index.88a4088d.js
index.305df559.js
index.1215d811.js
index.5679ceb3.js
index.7054a3b9.js
index.55814a39.js
index.736798de.js
index.22915549.css
index.70270543.css
index.beb1a65b.js
index.cf7a57e7.css
index.ed378e62.css
index.f906e9a9.js
inline-style-parser.94222170.js
is-buffer.8f2d14e8.js
is-plain-obj.5914775f.js
js-cookie.3d53dc3f.js
json2mq.8a649be1.js
lodash.9f59e410.js
longest-streak.7bb4efd1.js
markdown-table.5bc58d43.js
MarkdownLinkUtil.21c66b9e.js
mdast-util-definitions.a742159e.js
mdast-util-find-and-replace.7ab5ba95.js
mdast-util-from-markdown.44cf8fe8.js
mdast-util-gfm-autolink-literal.f32082f0.js
mdast-util-gfm-footnote.9f5cbf8c.js
mdast-util-gfm-strikethrough.a9b9f276.js
mdast-util-gfm-table.86ff59cf.js
mdast-util-gfm-task-list-item.40d7ca5a.js
mdast-util-gfm.429990b7.js
mdast-util-to-hast.f14eb9e2.js
mdast-util-to-markdown.baf38fd2.js
mdast-util-to-string.fb536fe5.js
memoize-one.d2b40972.js
micromark-core-commonmark.3fac04b8.js
micromark-extension-gfm-autolink-literal.422a0654.js
micromark-extension-gfm-footnote.a16b4cca.js
micromark-extension-gfm-strikethrough.a97f0121.js
micromark-extension-gfm-table.a83caa90.js
micromark-extension-gfm-tagfilter.3a58799e.js
micromark-extension-gfm-task-list-item.eaae8848.js
micromark-extension-gfm.03975213.js
micromark-factory-destination.f465b346.js
micromark-factory-label.bdfeb2ce.js
micromark-factory-space.8ec3c024.js
micromark-factory-title.f3aaaa31.js
micromark-factory-whitespace.1bcc98ff.js
micromark-util-character.2c47e118.js
micromark-util-chunked.52039b2e.js
micromark-util-classify-character.f47a059b.js
micromark-util-combine-extensions.697f0677.js
micromark-util-decode-numeric-character-reference.a2285e6c.js
micromark-util-decode-string.5840a04a.js
micromark-util-encode.3244b6a9.js
micromark-util-html-tag-name.94b32f7b.js
micromark-util-normalize-identifier.d8c35b62.js
micromark-util-resolve-all.d38fe386.js
micromark-util-sanitize-uri.c047199a.js
micromark-util-subtokenize.980f7106.js
micromark.74065510.js
moment.296db6fc.js
nano-css.a4284e93.js
PromiseUtil.2bdf064a.js
prop-types.da681dba.js
property-information.89563893.js
query-string.7a820323.js
rc-align.2cb686aa.js
rc-cascader.89997110.js
rc-checkbox.c3f49b94.js
rc-collapse.2def3244.js
rc-dialog.908bfba3.js
rc-drawer.b63111ee.js
rc-dropdown.f95b8d8f.js
rc-field-form.5c6c5039.js
rc-image.2725ce8a.js
rc-input-number.23d0c44d.js
rc-input.acb52a36.js
rc-mentions.740dd36d.js
rc-menu.a6fb28fd.js
rc-motion.d81caebe.js
rc-notification.c681ae48.js
rc-overflow.0e71b119.js
rc-pagination.b5879506.js
rc-picker.cf8fb510.js
rc-progress.e2463761.js
rc-rate.bcfa0bbf.js
rc-resize-observer.2035469b.js
rc-segmented.081aa9a1.js
rc-select.1953886b.js
rc-slider.486ef046.js
rc-steps.93b5c4e4.js
rc-switch.17359adc.js
rc-table.4ec31117.js
rc-tabs.9a13c0cd.js
rc-textarea.c1453a04.js
rc-tooltip.ae08d5b8.js
rc-tree-select.5d9a11ae.js
rc-tree.3db92643.js
rc-trigger.99fa7870.js
rc-upload.ca876cbd.js
rc-util.f428f10c.js
rc-virtual-list.626f37f6.js
react-dom.8eae3107.js
react-highlight-words.36ddf745.js
react-is.e13562bd.js
react-markdown.64120013.js
react-router-dom.ad2c77d1.js
react-router.ab39842d.js
react-universal-interface.7a3c3f06.js
react-use.f90ee3b0.js
react.bcb0ff15.js
remark-gfm.e6635c2d.js
remark-parse.ae27876c.js
remark-rehype.2216e902.js
remark-stringify.8ee5cd32.js
resize-observer-polyfill.d94677fa.js
scheduler.5bc07c2b.js
screenfull.052256b6.js
scroll-into-view-if-needed.93ce78d3.js
set-harmonic-interval.0bd973ad.js
shallowequal.9e085e62.js
space-separated-tokens.35ab6e8e.js
split-on-first.cf03b920.js
strict-uri-encode.82768c6e.js
string-convert.e390e5f3.js
style-to-object.75795970.js
throttle-debounce.67b1deba.js
toggle-selection.ddb32806.js
trim-lines.43d268d3.js
trough.51e639e8.js
ts-easing.bad5e04d.js
tslib.42edd759.js
unified.cb173dc7.js
unist-builder.2e9ab696.js
unist-util-generated.204d4e65.js
unist-util-is.01e12dde.js
unist-util-position.4af3aa9c.js
unist-util-stringify-position.9bacc487.js
unist-util-visit-parents.7a4d7581.js
unist-util-visit.23fe510a.js
UnusedResourceView.60e2f5f7.js
vfile-message.84519071.js
vfile.7e51f900.js
yaml.934606dc.js
zwitch.ff65d30c.js
```