Starting in v0.8.0 the dependency version for three in package.json is given as github:supermedium/three.js#r90fixMTLLoader. When installing the aframe npm package the entire content of the three.js github repository is downloaded, which includes hundreds of megabytes in the examples/ directory. (I tested installing with yarn.) The resulting dependency size makes it impossible to install the npm package in CodeSandbox which places a limit on the disk quota for each sandbox.
There is a workaround, which is to fetch aframe using a script tag in CodeSandbox examples. For example: <script src="https://aframe.io/releases/0.8.0/aframe.min.js"></script>.
It might be possible to create an aframe fork of threejs where automatically a bot gets every update on the master of threejs and removes everytime the examples directory to speed up aframe installs?
Problem is three.js puts some relevant code in the examples directory that gets included...GLTFLoader, OBJLoader. Can just use from the script tag, and you get CDN for free anyways.
Maybe worth filing and issue on the THREE repo.
I only get ~15 MB just from npm install three; contents of examples/js are included but e.g. models are not. See .npmignore. If we're getting 400MB, something downstream of three.js isn't working as expected. 馃槙
That's expected result when using git repo as dependency
like in v0.8.2 then .npmignore. has no effect.
v0.8.2
https://github.com/aframevr/aframe/blob/abd7b9910fcaf208bdc943a0b8ecad3fa7790869/package.json#L44
master
https://github.com/aframevr/aframe/blob/276a8b226e8bc604d18ef9f0a2554822edc2d93f/package.json#L51
Since master has r95 then next version will not have that issue.
So a new release has to be made to fix this issue?
@kevinsimper yes, therefore that issue can be closed when new release is published.
@mkungla not sure if this is the best place to ask, but is there any date for a new release? It would be great using a release from npm which understand Oculus Go controls...
Not sure, I'm not right person who can give you answer on that.
Keep eyes on slack and https://github.com/aframevr/aframe/milestones
Thanks @mkungla !!!
I opened https://github.com/aframevr/aframe/pull/3987 moving THREE dependency from Github to NPM and I don't see any differences in the node_module folder size. @jgbarah @mkungla @hallettj Can you provide any feedback and check if the PR fixes any issues for you?
@dmarcos Nice, great work 馃憤
Most helpful comment
That's expected result when using git repo as dependency
like in
v0.8.2then.npmignore.has no effect.v0.8.2
https://github.com/aframevr/aframe/blob/abd7b9910fcaf208bdc943a0b8ecad3fa7790869/package.json#L44
master
https://github.com/aframevr/aframe/blob/276a8b226e8bc604d18ef9f0a2554822edc2d93f/package.json#L51
Since master has r95 then next version will not have that issue.