Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mini-css-extract-plugin crashes with tagAssetsWithKey #90

Open
Austaras opened this issue Jan 7, 2021 · 2 comments
Open

mini-css-extract-plugin crashes with tagAssetsWithKey #90

Austaras opened this issue Jan 7, 2021 · 2 comments
Labels

Comments

@Austaras
Copy link
Contributor

Austaras commented Jan 7, 2021

When I configured this plugin with

targets: {
        modern: true,
        legacy: {
          tagAssetsWithKey: true,
        },
      },

mini-css-extract-plugin will crash

@DanielSchaffer
Copy link
Owner

@Austaras can you add some more details? (stack trace, package versions, etc)

@Austaras
Copy link
Contributor Author

I'm using master branch of this repo and got

ERROR in chunk main [initial]
    main.css
    Cannot read property 'pop' of undefined
    TypeError: Cannot read property 'pop' of undefined
        at MiniCssExtractPlugin.renderContentAsset (/home/chla/Code/webpack-babel-multi-target-plugin/node_modules/mini-css-extract-plugin/dist/index.js:343:44)
        at Object.render (/home/chla/Code/webpack-babel-multi-target-plugin/node_modules/mini-css-extract-plugin/dist/index.js:174:32)
        at Compilation.createChunkAssets (/home/chla/Code/webpack-babel-multi-target-plugin/node_modules/webpack/lib/Compilation.js:2035:29)
        at /home/chla/Code/webpack-babel-multi-target-plugin/node_modules/webpack/lib/Compilation.js:1359:10
        at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/chla/Code/webpack-babel-multi-target-plugin/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
        at AsyncSeriesHook.lazyCompileHook (/home/chla/Code/webpack-babel-multi-target-plugin/node_modules/tapable/lib/Hook.js:154:20)
        at Compilation.seal (/home/chla/Code/webpack-babel-multi-target-plugin/node_modules/webpack/lib/Compilation.js:1304:27)
        at /home/chla/Code/webpack-babel-multi-target-plugin/node_modules/webpack/lib/Compiler.js:665:18
        at /home/chla/Code/webpack-babel-multi-target-plugin/node_modules/webpack/lib/Compilation.js:1224:4
        at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/chla/Code/webpack-babel-multi-target-plugin/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:20:1)
        at AsyncSeriesHook.lazyCompileHook (/home/chla/Code/webpack-babel-multi-target-plugin/node_modules/tapable/lib/Hook.js:154:20)
        at Compilation.finish (/home/chla/Code/webpack-babel-multi-target-plugin/node_modules/webpack/lib/Compilation.js:1216:28)
        at /home/chla/Code/webpack-babel-multi-target-plugin/node_modules/webpack/lib/Compiler.js:662:17
        at _done (eval at create (/home/chla/Code/webpack-babel-multi-target-plugin/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
        at eval (eval at create (/home/chla/Code/webpack-babel-multi-target-plugin/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:31:22)
        at runMicrotasks (<anonymous>)

You could test with this branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants