Skip to content

Common chunk much larger when served with webpack-dev-server #728

@jouni-kantola

Description

@jouni-kantola

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

What is the current behavior?
When the example below is built with webpack@v2.2.0-rc.3, without serving with webpack-dev-server the common chunk vendor is 1.59 kb. When served with webpack-dev-server@v2.2.0-rc.0 the same bundle is 245 kb. This is pretty confusing as it triggers performance budget warnings.

If the current behavior is a bug, please provide the steps to reproduce.
Example: https://github.com/jouni-kantola/webpack-output-by-build-type/tree/webpack2-dev-server
Pull the repo. Run following to see difference in file sizes:

  1. npm run build (vendor: 1.59 kb)
  2. npm run serve (vendor: 245 kb)

What is the expected behavior?
It would be more intuitive if built files, with or without serving with webpack-dev-server, results in the same bundles.

Please mention your webpack and Operating System version.

  • webpack@v2.2.0-rc.3
  • webpack-dev-server@v2.2.0-rc.0
  • node v6.8.0
  • OS: MacOS Sierra (10.12.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions