代码之家  ›  专栏  ›  技术社区  ›  pars

是否可以仅将node\u modules文件夹与webpack捆绑/最小化?

  •  0
  • pars  · 技术社区  · 8 年前

    node_modules 文件夹很大,我想把它捆起来吗?/用死代码消除最小化。

    - bin/file-1.js - bin/file-2.js - bin/folder-A/file-A1.js - bin/folder-A/file-A2.js - bin/folder-B/file-B1.js - bin/folder-B/file-B2.js - bin/folder-B/folder-BB/file-BB1.js - bin/folder-B/folder-BB/file-BB2.js - node_modules/module-1 - node_modules/module-2 - node_modules/module-3 - node_modules/module-4 我只需要下面的4个模块 节点模块 最小化,这样当我将它与无服务器fw一起部署到AWS lambda时不会占用太多空间

    1 回复  |  直到 8 年前
        1
  •  0
  •   pars    8 年前

    我最后用 node-prune . 比使用webpack要简单得多,而且实际缩小的大小也要小得多。