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

module order in bundle #4588

Closed
MikailBag opened this issue Mar 28, 2017 · 5 comments
Closed

module order in bundle #4588

MikailBag opened this issue Mar 28, 2017 · 5 comments

Comments

@MikailBag
Copy link

Do you want to request a feature or report a bug? feature

What is the current behavior?
webpack orders modules in bundle, as he wants

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

I think it would be better to put all modules from node_modules and etc. into the end of bundle.

If this is a feature request, what is motivation or use case for changing the behavior?

Now, when I get some error and lool at bundle.js, I see mix of my code and some dependencies, so
I need to scroll to find module I need

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
Windows 10, 32bit
webpack 1.13.2
nodejs 7.7.2

@sokra
Copy link
Member

sokra commented Mar 29, 2017

It sort modules in a way so it generates the smallest module ids for often used modules.

@sokra sokra added this to the webpack 3 milestone Mar 29, 2017
@sokra
Copy link
Member

sokra commented Mar 29, 2017

We can add a sorting mode with a better DX.

@MikailBag
Copy link
Author

Current way is good for production.
But in development suggested sorting will be more comfortable.
It won't break API.

@sokra
Copy link
Member

sokra commented Mar 31, 2017

In dev you probably use a devtool anyway which shows the modules in the devtool tree.

@sokra
Copy link
Member

sokra commented Mar 31, 2017

Not worth it.

@sokra sokra closed this as completed Mar 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants