Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify that npm prune is working, and if not get it working #1372

Open
jonespm opened this issue Apr 21, 2022 · 2 comments
Open

Verify that npm prune is working, and if not get it working #1372

jonespm opened this issue Apr 21, 2022 · 2 comments

Comments

@jonespm
Copy link
Member

jonespm commented Apr 21, 2022

It looks like we could maybe optimize how node_modules is built. Some of the dependencies under devDependencies are more like dependencies (@material-ui, js-cookie, typeface-roboto?). Looking at the Docker artifacts, I see there is an effort to remove extraneous packages (npm prune --production), but I'm not sure if it's actually working. When I go to OpenShift and peak inside node_modules, I still see jest, webpack, -loader, etc. We should probably also make sure that the frontend unit test and related artifacts are left behind from the production images (currently, they are under assets/src/__tests__).

Originally posted by @ssciolla in #1363 (comment)

@jonespm
Copy link
Member Author

jonespm commented Apr 21, 2022

Also from a comment in that threat

It looks like @justin0022 originally added the npm prune afd74b5.

I've never checked to see if it's working either.

It looks like it might have to be combined with node-prune to really remove the node_modules. I saw that mentioned in this article here: itsopensource.com/how-to-reduce-node-docker-image-size-by-ten-times

I think we can just address this in a separate issue but yeah having the appropriate things in devDependencies makes sense to me.

@jonespm
Copy link
Member Author

jonespm commented Apr 21, 2022

This is somewhat related to #987 that hasn't been merged yet

@jennlove-um jennlove-um added this to To do in MyLA-2023.02.01 via automation Apr 27, 2023
@jennlove-um jennlove-um removed this from To do in MyLA-2023.02.01 May 25, 2023
@jennlove-um jennlove-um added this to To do in MyLA-Default-Project via automation May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants