Questions tagged [commonschunkplugin]

CommonsChunkPlugin is a webpack plugin that helps you bundle common code among your modules into separate bundles.

72 questions
0
votes
1 answer

Clean Up Old Chunk Files in Webpack 4

I am using splitChunks to optimize my app, but after one chunk updates, the browser pulls down all assets because clean-webpack-plugin removes the entire dist folder, changing the requested If-Modified-Since. Is there any way to clean up just the…
ge022
  • 134
  • 1
  • 7
0
votes
2 answers

Split vendor bundle

My vendor bundle is getting really big and I want to split into 2 parts. (One part with all the react related packages, and the other with the rest of the packages). What I currently have to create the vendor bundle is: new…
Metarat
  • 579
  • 2
  • 7
  • 20
0
votes
1 answer

CommonsChunkPlugin react chunk files over size

I have a react project build with webpack2, however the the built chunk files are all over size and the total size is over 10M! here is part of my configuration and the log output. module.exports = { entry: { app: appConf.entry }, …
Chad Ding
  • 21
  • 4
0
votes
1 answer

commonsChunkPlugin not grouping node_modules

I would like to move all common chunks of my bundles to a vendor.[chunkhash].js file. However after inspecting the output I see some node_modules are included more then once having a large impact on output size. Webpack commonsChunkPlugin new…
NealVDV
  • 2,302
  • 3
  • 26
  • 51
0
votes
1 answer

Manifest meaning in chunkhash webpack

I'm learning webpack and how to use the chunkhash features. In this example on github, it uses a 'manifest' name in the plugin. What is it for? I didn't find any explanation for its use case. Thank you. var path = require("path"); var webpack =…
Quoc-Hao Tran
  • 1,312
  • 3
  • 13
  • 20
0
votes
1 answer

Webpack bundle splitting commonschunk plugin

I am using CommonsChunkPlugin to split my vendor bundles. I also have ExtractTextPlugin to extract CSS into one file. But, for some reason, I am getting vendor.css as well. Here's my webpack config: const config = { output: { publicPath:…
0
votes
1 answer

How to config my webpack.config.js to extract these dependances?

the construct of the object I want to extract 'vue' to a chunk, 'jquery' to a chunk and something relating with 'vue',like 'vuex', 'vue-router' to another chunk. and what should do with CommonChunkPlugin? These codes were my config, It conbine the…
Tony_zha
  • 97
  • 6
0
votes
1 answer

ReactJs.NET webpackJsonp is not defined in server side rendering

I have been following along the guide to make Webpack work with React.NET (at https://reactjs.net/guides/webpack.html), and one of my requirements is to have third party libraries in a separate bundle. For this, I've made use of the…
Walden2
  • 33
  • 4
0
votes
1 answer

How to define entry point for webpack CommonsChunkPlugin?

In my webpack config I have entry defined as like this - entry: [ 'webpack-hot-middleware/client', './src/app.jsx' ], I had realized that my bundle size getting generated as around 8 mb in size. So I decided to split the vendor…
WitVault
  • 23,445
  • 19
  • 103
  • 133
0
votes
1 answer

How could I build on one of multiple entries with webpack

with webpack ,we can build multiple entries just like below: ``` { entry:{ 'a':'a.js', 'b':'b.js' }, ... plugins:[ new webpack.optimize.CommonsChunkPlugin({ name:'vendor', …
0
votes
1 answer

Webpack's CommonsChunkPlugin and the use of "import * as"

I am learning Webpack for quite a while and came across a weird behavior. As described in the Webpack Introduction on angular.io I am importing all my vendor modules into the vendor.ts-file, all polyfills into the polyfill.ts-file and initialize…
janwo
  • 754
  • 2
  • 8
  • 17
0
votes
1 answer

Webpack, how to take out module into his own build layer?

With default build settings I get following build layers: (X+A), (Y+A+B), (Z+B). I want: (X+A), (Y+A), Z, B B should load only once when we asking Y and Z modules. I found CommonsChunkPlugin, but I cant configure it properly. var webpack =…
1 2 3 4
5