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

Rewrites the whole bundle every time? #105

Closed
AndrewRayCode opened this issue Jun 27, 2016 · 7 comments
Closed

Rewrites the whole bundle every time? #105

AndrewRayCode opened this issue Jun 27, 2016 · 7 comments
Labels

Comments

@AndrewRayCode
Copy link

I'm trying to debug why my webpack build time and hot reload time are so large (10-30 seconds per reload). I filed the original ticket: webpack/webpack#2552

I have many large asset files that are processed through webpack. I put them in a separate entry module:

  entry: {
    main: [
      'webpack-hot-middleware/client?path=http://' + host + ':' + port + '/__webpack_hmr',
      'font-awesome-webpack!./src/theme/font-awesome.config.js',
      './src/client.js'
    ],
    assets: './src/assets.js'
  },

and that assets.js file requires all of the large files:

require( '../assets/models/large-asset-1.json' );
require( '../assets/models/large-asset-2.json' );
...

@sokra mentioned in the above linked ticket that the file watcher should not re-create the large assets in the bundle. However it appears that when using this webpack-dev-middleware, they are re-created every time.

I've looked into using the DLLPlugin but the docs for dllplugin say to use DLLReferencePlugin in the dev server config, buutttt it doesn't look like dev server config is exposed in this library? I might just be misreading the README.

So I'm trying to figure out if I can avoid my whole ~50mb bundle from being re-written every time with this library, and if it's possible to use this library with the DLLPlugin.

@SpaceK33z
Copy link
Member

It's been three months, so I don't know if you still have this issue, but:

I've looked into using the DLLPlugin but the docs for dllplugin say to use DLLReferencePlugin in the dev server config, buutttt it doesn't look like dev server config is exposed in this library? I might just be misreading the README.

With "dev server config", they essentially mean your webpack.config.js settings but only for development.

@SpaceK33z
Copy link
Member

I'm closing this issue because of inactivity. Feel free to comment, and we can always re-open it again.

@Simmer-Jun
Copy link

Having the same problem using webpack-dev-middleware with express, webpack just emmitted all the chunk every time when modify a single file,and make rebuild slow. So , is there any way to solve this problem ? I just want to know why webpack seems like do not having cache the compiled file when using webpack-dev-middleware?

@chaserstrong
Copy link

me too.

@shellscape
Copy link
Contributor

@chaserstrong please do not post "me too" or "same" replies. instead, use the reaction button on the top right of the post you agree with or want to show support for.

@chaserstrong
Copy link

@shellscape i mean i have the same problem and have no idea how to solve it.

@shellscape
Copy link
Contributor

Yes, I understood. Please use the reaction buttons instead of making replies like those. They don't contribute anything to the issue.

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

5 participants