Why is Webpack bundle.js transfered twice in isomorphic app? -


i notice in production bundle.js file transferred twice. second time requested bundle.js file itself.. default or configuration related?

also notice second time bundle.js requested takes 192ms, less 634ms on first time. maybe because file cached.

note: isomorphic app , restify there serve assets files.

check screenshot bellow: enter image description here

some of webpack production settings im using:

module.exports = {     devtool: false,     output: {         path: resolve(__dirname, 'dist', 'www'),         publicpath: '/www/',         filename: 'bundle.js',     },     plugins: [         new webpack.optimize.uglifyjsplugin({             mangle: true,             compress: {                 warnings: true,                 screw_ie8: true,                 conditionals: true,                 unused: true,                 comparisons: true,                 sequences: true,                 dead_code: true,                 evaluate: true,                 if_return: true,                 join_vars: true,             },             output: {                 comments: false,             },         }),         new extracttextplugin('styles.css'),     ],     module: {         loaders: [{             test: /\.js$/,             loader: 'babel-loader',             include: resolve(__dirname, 'src', 'main'),             exclude: /node_modules/,         }, {             test: /\.*css$/,             loader: extracttextplugin.extract({                 fallback: 'style-loader', use: 'css-loader?-autoprefixer!sass-loader',             }),         }],     } }; 

the issue related sourcemaps fetching when chrome developer tools opened. tested charles proxy answer in question (https://stackoverflow.com/a/30777461/2400247) and, in fact, bundle.js downloaded once.

check charles test below:

enter image description here

hope helps other devs.


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -