Common chunk much larger when served with webpack-dev-server
See original GitHub issueDo 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:
npm run build(vendor: 1.59 kb)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)
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)

Top Related StackOverflow Question
You can also include a
<script>manually to include the client script webpack-dev-server needs. See this example.Thank you. That fixed the issue. I didn’t even know that option existed.
Is there anyway of controlling where the emitted code for
inlineshould be outputted? I’ve extracted the webpack manifest and inlined that into the page. This seems like a good place to include what’s required for webpack-dev-server as well.