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

Drop individual AMD files from build output #1096

Closed
TrySound opened this issue Sep 11, 2015 · 8 comments
Closed

Drop individual AMD files from build output #1096

TrySound opened this issue Sep 11, 2015 · 8 comments
Labels
Milestone

Comments

@TrySound
Copy link
Contributor

Suggest to ignore amd dist on npm module. It's almost 1.5mb.

@jonschlinkert
Copy link
Contributor

A better option is to add the necessary files to the files property in package.json. I was just coming here to make the same request. @kpdecker I'd be happy to do a pr if it would help. I haven't looked at which files would be required yet, so any advice there would be good

@TrySound
Copy link
Contributor Author

@jonschlinkert Agree.

@kpdecker
Copy link
Collaborator

What is the impact of having these files? I've always assumed that disk space is cheap on the server but perhaps there are use cases that are impacted more.

Including these files was by design for the most part to try to get people out of the cycle of having version mismatches between the precompiler and the clients that they are using but we might be able to drop the amd specific files, I don't think the direct AMD linking case ever really worked out for anyone due to the confusion around default at the time those were originally implemented but this would none the less be a breaking change so I want to make sure I know all of the impacts.

@kpdecker
Copy link
Collaborator

Any feedback here?

@nknapp
Copy link
Collaborator

nknapp commented Sep 25, 2015

Personally I wouldn't create a new major version for this. 1.5 MB is not that much. But if a new major comes around anyway, I would like to see it in there, for the following reasons:

  • A lot of modules have a dependency on handlebars, so it gets pulled into the node_modules directory with those modules. It may even occur multiple times in the dependency-tree, which means that the 1.5 MB easily add up to three, six or even more MB.
  • Disk space is cheap on the server, but not all of those modules are server modules. Some are parts of build-tools or documentation-tools. That means, Handlebars may also be included in the devDepencendies of possibly all 20 or more modules in my workspace.

My more general point is: Just because disk space is cheap on the server doesn't mean we should waste it. It may not have an impact on a production machine, but it certainly has during development.

My bootprint-package needs 62 MB of hard-disk-space and if you don't have a recent computer with SSDs, you have waited quite long time to download and install everything. Waiting is not a good user-experience.
61 MB are occupied by dependencies, so I have to research where the space is wasted. Then I have to file issues and hope that the maintainers are willing to do something about it. I have had a look at the bootprint-dependencies and found out that 8.1 MB are test-files of LessCss.
I haven't looked through all dependencies yet, but Handlebars is in there as well...

@jonschlinkert
Copy link
Contributor

Personally I wouldn't create a new major version for this. 1.5 MB is not that much.

totally agree, this is mostly just a nice to have.

My main interest in this is that downloads and init times are faster when fewer files are in the dependency tree. The bigger the dependency tree, the bigger the impact.

@kpdecker
Copy link
Collaborator

These files have been a source of much confusion and I think that people aren't really using them in light of the UMD implementation. I still think that npm's dedupe behavior takes away a lot of the concerns here but I think we can get away with dumping the files on the next major, whenever that may be.

@kpdecker kpdecker changed the title npmignore Drop individual AMD files from build output Sep 28, 2015
@nknapp
Copy link
Collaborator

nknapp commented Oct 17, 2015

I would like to take the stress out of my comment a little: With npm@3, installed dependencies are automatically flattened (and deduped), so the argument of Handlebars occuring in the dependency tree multiple times only applies if multiple versions of Handlebars appear in the tree.

@kpdecker kpdecker modified the milestone: 5.0.0 Dec 12, 2015
@kpdecker kpdecker added the bug label Dec 12, 2015
kpdecker added a commit that referenced this issue Dec 14, 2015
Users can utilize the UMD library if they are still using require.js and if they need to have specific modules, they can consume the cjs or es6 modules via webpack or similar.

Fix for #1096
nknapp pushed a commit that referenced this issue Mar 9, 2017
Users can utilize the UMD library if they are still using require.js and if they need to have specific modules, they can consume the cjs or es6 modules via webpack or similar.

Fix for #1096
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants