Skip to content

Conversation

@tdebarochez
Copy link

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

This quick patch fix the error I get while building my app:

ERROR in chunk vendor [initial]
styles/vendor.2b18cc82139defdd381f.css
Cannot read property 'pop' of undefined
TypeError: Cannot read property 'pop' of undefined
    at MiniCssExtractPlugin.renderContentAsset (/Users/tdebarochez/repo/node_modules/mini-css-extract-plugin/dist/index.js:342:44)
    at Object.render (/Users/tdebarochez/repo/node_modules/mini-css-extract-plugin/dist/index.js:174:32)
    at Compilation.createChunkAssets (/Users/tdebarochez/repo/node_modules/webpack/lib/Compilation.js:2427:29)
...

Breaking Changes

N/A

Additional Info

Disclaimer: I absolutely don't know what I am doing. The only thing I know is that fix my build process. I didn't get this error before upgrading my package-lock.json to node v10.
If someone can tell me how to target the fail module, I could provide a reproductible test case.

Disclaimer: I absolutely don't know what I am doing.
@jsf-clabot
Copy link

jsf-clabot commented Nov 15, 2018

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need tests

@duvillierA
Copy link

duvillierA commented Nov 20, 2018

Node@10.13
Webpack@4.25.1
babel@7
mini-css-extract-plugin@0.4.4

Fore more details, this issue appears when splitChunks.cacheGroups is set.

      splitChunks: {
        cacheGroups: {
          vendor: {
            test: /[\\/]node_modules[\\/]/,
            name: 'vendor',
            chunks: 'all',
            enforce: true
          }
        }
      }

@alexander-akait
Copy link
Member

Invalid solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants