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

Optimising modules with no loaders #43

Closed
ersel opened this issue Apr 30, 2018 · 3 comments
Closed

Optimising modules with no loaders #43

ersel opened this issue Apr 30, 2018 · 3 comments

Comments

@ersel
Copy link

ersel commented Apr 30, 2018

Hi @stephencookdev ,

Firstly, thanks for developing this plugin. I have a question regarding the Modules with no loaders output.

Our current webpack config produces the following output:

 SMP  ⏱  Loaders
babel-loader took 8.56 secs
  module count = 821
modules with no loaders took 5.3 secs
  module count = 104

I was wondering if and how we can optimize our configuration to skip those 104 modules with no loaders?

@stephencookdev
Copy link
Owner

Hey @ersel :)

So "modules with no loaders" are any JS file that webpack just loads in. Probably your bulk of files here is coming from node_modules

I'll try and add a feature in the future to help visualise what all of these files are that are taking time. But until then, if you download webpack-bundle-analyzer you should be able to see all of your dependencies (sorted by their size). Cutting down on needlessly large dependencies will help reduce this number!

@ersel
Copy link
Author

ersel commented Apr 30, 2018

Thanks Steve, a list of files would be very helpful to see. I will try webpack-bundle-analyzer.

Maybe CLI could even give some recommendations on how to optimize different loaders.

e.g:
node-sass taking too long? see fast-sass-loader
babel-loader taking too long? try setting cacheDirectory to true if not set already etc...

@ersel ersel closed this as completed Apr 30, 2018
@yizhengfeng-jj
Copy link

Hey @ersel :)

So "modules with no loaders" are any JS file that webpack just loads in. Probably your bulk of files here is coming from node_modules

I'll try and add a feature in the future to help visualise what all of these files are that are taking time. But until then, if you download webpack-bundle-analyzer you should be able to see all of your dependencies (sorted by their size). Cutting down on needlessly large dependencies will help reduce this number!

Hello, has this function been implemented, and is there any documentation?

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

No branches or pull requests

3 participants