为什么一个新的Rails应用需要106MB的JavaScript?

2020-07-02 04:10:52

$cd/tmp$rails-v rails 6.0.3.2$rails新的my-app使用-T-d PostgreSQL from/Users/rileytg/.ails src#use postgres,not use test(通常添加RSpec)。这是一个相当常见的Rails堆栈.Bundle Complete!14个Gemfile依赖项,现在安装了65个gem.正在安装所有的JavaScript依赖项[4.2.2]来自";.";.";.的Run✨添加@rails/[email protected]。正在安装用于实时重新加载的开发服务器运行纱添加--dev webpack-dev-server来自";.";.✨在8.24中完成.WebPacker已成功安装🎉🍰$cd my-app/$du-h-d 1 60K./APP 32K./BIN🧐120K./CONFIG🧐106M./NODE_MODULES🧐0B./STORAGE🧐16B./PUBLIC🧐0B./lib4.0K./db 0B./log 72K./.git 27M./tmp 0B./vendor134M.。

$du-h-d 1节点模块/|gort-hr|wc-l 768#top 10$du-h-d 1节点模块/|gort-hr|head-n 10106M节点模块/7.4M节点模块//@babel6.8M节点模块//core-js5.9M节点模块//node-sass4.8M节点模块//lowash3.2M节点模块//caniuse-lite3.1M节点模块//。#mediate(Ish)10Rileys-MBP:my-app rileytg$du-h-d 1 node_module/|gort-hr|head-n 384|ail-n 10 32K node_module//随机字节32K node_module//prr 32K node_module//postcss-safe-parser 32K node_module//postcss-media-minmax 32K node_module//postcss-flegs-fix-fix 32K node_module//postcss-media-minmax 32K node_module//postcss-flegs-fix bugs-fix 32K node_module//postcss-media-minmax 32K node_module//postcss-flegs-fix。30$du-h-d 1节点模块/|gort-hr|head-n 30|ail-n 10964K节点模块//@type848K节点模块//webpack-dev-server844K节点模块//async840K节点模块//snapdragon836K节点模块//pako824K节点模块//source-map752K节点模块//neo-async708K节点模块//Blue