Open ZhangYiJiang opened 6 years ago
I noticed that adding autotrack
to a project's dependencies in order to import the plugins also adds various large packages such as rollup
and google-closure-compiler-js
. It would be good not to have these installed by default.
Currently autotrack includes all of the tools needed to build a custom bundle as direct dependencies. This makes it easy to build since users just have to run
npm install
and all of the build dependencies will be automatically installed, but for users who already use their own bundler and just needs the source, the additional dependencies do add quite a bit of size to node_modules -16MB is not a huge amount of disk space, but it is a lot relative to the amount of actual code the package is exporting (more than 16x), and completely unused for many people. A simple way to fix this is to make all of the package dependencies optional, then users who don't need it can use
--no-optional
when installing to reduce their installation size.A better, but far more involved solution would be to split the build toolchain into its own package and let users who want to do a custom build install that instead.