GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Feat]: use node-prune to remove all unnecessary files from the distribution · Issue #5883 · coder/code-server

[Feat]: use node-prune to remove all unnecessary files from the distribution #5883

New issue
Copy link
New issue
Copy link
Open
Open
[Feat]: use node-prune to remove all unnecessary files from the distribution#5883
Copy link
Labels
enhancementSome improvement that isn't a feature
Milestone
On Deck

Description

@pavelxdd
pavelxdd
opened on Dec 14, 2022
Issue body actions

What is your suggestion?

Currently in the code-server distribution archives there are over 56000 files, most of them are:

  • READMEs
  • CHANGELOGs
  • LICENSEs
  • TypeScript files
  • C sources and headers
  • Linter configs
  • and so on...

I propose to use node-prune when building code-server to get rid of all unnecessary files.

Why do you want this feature?

To slim down the distribution size and for cleaneleness.

Activity

  1. pavelxdd
    added
    enhancementSome improvement that isn't a feature
    on Dec 14, 2022
  2. jsjoeio commented on Dec 14, 2022

    @jsjoeio
    jsjoeio
    on Dec 14, 2022
    Contributor
    More actions

    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.

  3. jsjoeio
    added this to the On Deck milestone on Dec 14, 2022
  4. pavelxdd commented on Dec 14, 2022

    @pavelxdd
    pavelxdd
    on Dec 14, 2022
    Author
    More actions

    There's also yarn autoclean, but I didn't try it yet:
    https://classic.yarnpkg.com/lang/en/docs/cli/autoclean/

    Reacted by Joe Previte
  5. pavelxdd commented on Dec 14, 2022

    @pavelxdd
    pavelxdd
    on Dec 14, 2022
    Author
    More actions

    I've just tried yarn autoclean and it is more convenient, because no extra tool required, and you can set all cleaning patterns in .yarnclean file.

    Reacted by Joe Previte
  6. jsjoeio commented on Dec 14, 2022

    @jsjoeio
    jsjoeio
    on Dec 14, 2022
    Contributor
    More actions

    Amazing! I guess next steps for us is to:

    1. test yarn autoclean with code-server running in development aka yarn watch and make sure everything works
    2. 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 😂

  7. pavelxdd commented on Dec 14, 2022

    @pavelxdd
    pavelxdd
    on Dec 14, 2022
    Author
    More actions

    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.

    Reacted by Joe Previte
  8. jsjoeio commented on Dec 14, 2022

    @jsjoeio
    jsjoeio
    on Dec 14, 2022
    Contributor
    More actions

    Amazing! That sounds like the route we'd want to explore then.

  9. code-asher commented on Dec 19, 2022

    @code-asher
    code-asher
    on Dec 19, 2022
    Member
    More actions

    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.

    Reacted by Joe Previte
  10. code-asher commented on Jul 13, 2024

    @code-asher
    code-asher
    on Jul 13, 2024
    Member
    More actions

    Also we would need to keep the licenses probably.

  11. code-asher commented on Apr 7, 2026

    @code-asher
    code-asher
    on Apr 7, 2026
    Member
    More actions

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSome improvement that isn't a feature

    Type

    No type

    Projects

    No projects

      Milestone

      • On Deck

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.