guoyunhe / swc-minify-webpack-plugin

A faster minimizer for webpack based on swc.minify()
Apache License 2.0
7 stars 2 forks source link

Error: data did not match any variant of untagged enum MinifyTarget #10

Closed elado closed 1 month ago

elado commented 5 months ago

Seeing this error in a compilation, but there are no hints on what went wrong:

HookWebpackError: data did not match any variant of untagged enum MinifyTarget
    at makeWebpackError (/foo/node_modules/webpack/lib/HookWebpackError.js:48:9)
    at /foo/node_modules/webpack/lib/Compilation.js:3175:12
    at eval (eval at create (/foo/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:88:1)
-- inner error --
Error: data did not match any variant of untagged enum MinifyTarget
caused by plugins in Compilation.hooks.processAssets
Error: data did not match any variant of untagged enum MinifyTarget

I don't have processAssets hook or MinifyTarget so I guess it's internal.

Webpack 5.91.0

guoyunhe commented 5 months ago

Please provide a minimal reproduce repository.

elado commented 1 month ago

Thanks @martinjlowm, I can confirm #12 solves the issue 🙏