question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove `examples` from NPM package

See original GitHub issue
Description of the problem

For latest (three@0.119.1) package version examples folder in NPM package is took around 19 mb (mac Finder shows 17.7 mb).

I believe it’s a lot and should not be included in NPM package. Anyone could checkout repo and run any examples it need.

% du -hsx ./node_modules/three/examples | sort -n -r | head -n 10 
 19M    ./node_modules/three/examples

I can create PR.

Three.js version
  • r119
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, …)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
donmccurdycommented, Aug 5, 2020

It’s worth noting that a significant part of that size is not the source code in examples/js and examples/jsm, but the third-party libraries in examples/js/libs and examples/jsm/libs. The source code may depend on these libraries, though, so it’s still not trivial to delete. Maybe sourcemap support (and removing examples/js) will eventually allow us to not bundle some of those.

0reactions
ogonkovcommented, Aug 5, 2020

The reason for this issue way the fact that we save node_modules as artifact in CI workflow, and today it reach limit. I start investigate and found three.js package.

I guess I should rm -rf some parts before archiving it, since it’s not possible to reduce package size the other way.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uninstalling packages and dependencies - npm Docs
To remove a package from your node_modules directory, on the command line, use the uninstall command. Include the scope if the package is...
Read more >
Uninstalling npm packages with `npm uninstall` - Flavio Copes
How to uninstall an npm Node package, locally or globally.
Read more >
How can I uninstall npm modules in Node.js? - Stack Overflow
23 Answers 23 · Go to the node_modules directory of your repository. · Delete the Node.js module you don't want. · Don't forget...
Read more >
Uninstall a Package with npm - Mastering JS
npm uninstall also removes the package from your package.json , which means subsequent npm install won't install that package. This is a ...
Read more >
Adding and Removing Packages Using npm or Yarn
Learn how to add and remove packages globally and as project ... Examples of development dependencies would be testing utilities like mocha ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found