codepunkt/webpack-license-plugin

replenishDefaultLicenseTexts flag makes the output file unavailable when using react-jss

zoltan-mihalyi opened this issue · 7 comments

I noticed a weird bug: when I set replenishDefaultLicenseTexts: true and use react-jss package, the output file becomes unavailable.

Try the attached example, run "npm run dev" and open "localhost:9000/out.json" which gives 404.
When I remove react-jss or replenishDefaultLicenseTexts, it is working again.

package.zip

It seems like replacing compilation.hooks.optimizeChunkAssets.tap call with compilation.hooks.optimizeChunkAssets.tapAsync solves the problem.

Thanks Zoltan, I'll see when i can get to that. What version of webpack are you using?

I use these in the attached project:

{
    ...
    "webpack": "^4.44.2",
    "webpack-cli": "^3.3.12",
    "webpack-dev-server": "^3.11.0",
    ...
}

Should I create a PR? I'm afraid I can't write tests, though.

Someone made a PR before me, can you merge this, @codepunkt ?
#423

@codepunkt can you publish a hotfix version?

@zoltan-mihalyi published as 4.1.2, thanks!