Do you want to request a feature or report a bug?
Bug
What is the current behavior?
The build passes, but fails to concatenate, bundle size is bigger than with 2.6.1
ModuleConcatenation (inner): module is used with non-harmony imports from multi react-hot-loader/patch ./app.js
ModuleConcatenation: Cannot concat with ../node_modules/react-dom/index.js
ModuleConcatenation: Cannot concat with ../node_modules/react/react.js
ModuleConcatenation: Cannot concat with ./assets/styles/main.scss
ModuleConcatenation: Cannot concat with ../node_modules/cssrecipes-defaults/lib/box-sizing.css
ModuleConcatenation: Cannot concat with ../node_modules/cssrecipes-defaults/lib/document-remove-margin-padding.css
ModuleConcatenation: Cannot concat with ../node_modules/cssrecipes-defaults/lib/hidden.css
ModuleConcatenation: Cannot concat with ../node_modules/normalize.css/normalize.css
If the current behavior is a bug, please provide the steps to reproduce.
Tested on:
https://github.com/alexilyaev/react-es6-starter
See webpack3 branch:
alexilyaev/react-es6-starter#10
Run npm run build
What is the expected behavior?
I would expect the bundle size to at least stay the same…
And if I can figure out how to make ModuleConcatenationPlugin
work, to be smaller.
Bundle size results:
Webpack 2.6.1: 268KB
(67.3KB Gzip)
Webpack 3.0.0: 313KB
(78.3KB Gzip)
Webpack 3.0.0: 317KB
(78.6KB Gzip) (without ModuleConcatenationPlugin
)
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
macOS 10.12.5
Node 6.10.3
Everything else in package.json
I have the same issue and bigger bundle related to react-hot-loader,
So, i checked that in my webpack.prod.config.js – there are no anything related to hot loader, the only one place where it used
import { AppContainer as HotEnabler } from 'react-hot-loader';
in index.js file(root of project)And what i could see with webpack 2.2: everything is fine, bundle size 285 kb,
With webpack 3(just changed version): 323kb,
source-map-explorer telling me that with webpack 3, i have in the bundle
react-hot-loader – 4 kb
sourcemapped-stacktrace – 20 kb
redbox-react – 10kb
and it also telling me, that i do not have such libs in prod bundle with webpack 2
Question, why after migration to webpack 3, react-hot-reload appeared in bundle? with webpack 2.x everything is fine
@SidKwok @gaearon @aseem2625
Looks better, but I’m still confused, ModuleConcatenation is supposed to reduce your bundle size no? (there is a 50%% size reduction linked in the official release blog post: https://twitter.com/tizmagik/status/876128847682523138). Interested to hear some explanation around the bailouts, and why some people are seeing dramatic size reduction and others don’t.