1

I am using the webpack dllplugin for my dev configurations in my react project. I found out that two of my files are not getting updated on changes. I found out that this was caused because they are added to the dll manifest. Below is my dll webpack config file and the manifest that is created after I run the below command :

cross-env BUILDING_DLL=true webpack --display-chunks --color --config internals/webpack/webpack.dll.babel.js --hide-modules.

webpack.dll.babel.js:

const path = resolve('../node_modules/react-boilerplate-dlls');
const outputPath = path.join(process.cwd(), path);
var entry = { reactBoilerplateDeps: 
   [ 'babel-polyfill',
     'fontfaceobserver',
     'history',
     'hoist-non-react-statics',
     'immutable',
     'intl',
     'invariant',
     'lodash',
     'prop-types',
     'query-string',
     'react',
     'react-dom',
     'react-helmet',
     'react-intl',
     'react-loadable',
     'react-redux',
     'react-router-dom',
     'react-router-redux',
     'redux',
     'redux-immutable',
     'redux-saga',
     'reselect',
     'styled-components',
     'warning',
     'whatwg-fetch',
     'core-js',
     'eventsource-polyfill' ] }

module.exports = require('./webpack.base.babel')({
  context: process.cwd(),
  entry: entry,
  devtool: 'eval',
  output: {
    filename: '[name].dll.js',
    path: outputPath,
    library: '[name]',
  },
  plugins: [
    new webpack.DllPlugin({
      name: '[name]',
      path: join(outputPath, '[name].json'),
    }),
  ],
  performance: {
    hints: false,
  },
});

reactBoilerplateDeps.json:

{
  "name": "reactBoilerplateDeps",
  "content": {
   .....,
    "./app/utils/request.js": {
      "id": "./app/utils/request.js",
      "meta": {
        "harmonyModule": true
      },
      "exports": [
        "default"
      ]
    },
    "./node_modules/exports-loader/index.js?self.fetch!./node_modules/whatwg-fetch/fetch.js": {
      "id": "./node_modules/exports-loader/index.js?self.fetch!./node_modules/whatwg-fetch/fetch.js",
      "meta": {

      }
    },
    "./app/env.js": { 
      "id": "./app/env.js",
      "meta": {
        "harmonyModule": true
      },
      "exports": [
        "default"
      ]
    },
    "./node_modules/core-js/shim.js": {
      "id": "./node_modules/core-js/shim.js",
      "meta": {

      }
    },
    .....
  }
}

I don't understand why the app\utils\request.js and app\env.js files are added in the manifest file and what HarmonyModules : true signifies.

Any help is appreciated. Thank you :)

Ullas Hunka
  • 2,119
  • 1
  • 15
  • 28
Ragul Parani
  • 621
  • 7
  • 22

0 Answers0