You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
[Feat]: use node-prune to remove all unnecessary files from the distribution #5883
Woah, I haven't heard about this before. That's a neat tool! I think we need to run some tests to make sure there are no negative side effects. Thank you for sharing! cc @code-asher you might find this cool.
test yarn autoclean with code-server running in development aka yarn watch and make sure everything works
test with standalone release process
The only problem I forsee is we use yarn in development and npm with most release stuff so that could lead to some issues. I spent 2 days last week with yarn/npm issues 😂
node-prune is the perfect middle ground if you don't want to handle npm/yarn issues.
It also supports modifying patterns via --exclude and --include flags, but there's no config file, so these options should be provided via command line arguments.
Neat! I think this sounds like a great idea. The only thing I would want to be careful of is removing source maps as they can make debugging production issues easier.
Revisited this and removing source maps would cut the size in half, might be good to get rid of those after all. I think we can still match up stack traces after the fact anyway.
Activity
jsjoeio commentedon Dec 14, 2022
Woah, I haven't heard about this before. That's a neat tool! I think we need to run some tests to make sure there are no negative side effects. Thank you for sharing! cc @code-asher you might find this cool.
pavelxdd commentedon Dec 14, 2022
There's also
yarn autoclean, but I didn't try it yet:https://classic.yarnpkg.com/lang/en/docs/cli/autoclean/
pavelxdd commentedon Dec 14, 2022
I've just tried
yarn autocleanand it is more convenient, because no extra tool required, and you can set all cleaning patterns in.yarncleanfile.jsjoeio commentedon Dec 14, 2022
Amazing! I guess next steps for us is to:
yarn autocleanwith code-server running in development akayarn watchand make sure everything worksThe only problem I forsee is we use
yarnin development andnpmwith most release stuff so that could lead to some issues. I spent 2 days last week with yarn/npm issues 😂pavelxdd commentedon Dec 14, 2022
node-pruneis the perfect middle ground if you don't want to handle npm/yarn issues.It also supports modifying patterns via
--excludeand--includeflags, but there's no config file, so these options should be provided via command line arguments.jsjoeio commentedon Dec 14, 2022
Amazing! That sounds like the route we'd want to explore then.
code-asher commentedon Dec 19, 2022
Neat! I think this sounds like a great idea. The only thing I would want to be careful of is removing source maps as they can make debugging production issues easier.
code-asher commentedon Jul 13, 2024
Also we would need to keep the licenses probably.
code-asher commentedon Apr 7, 2026
Revisited this and removing source maps would cut the size in half, might be good to get rid of those after all. I think we can still match up stack traces after the fact anyway.