website
website copied to clipboard
Error unknown field keepClassnames/keepFnames in swc config
Steps to reproduce
Create swc config file and set keepClassnames and keepFnames of mangle options as described in documentation.
Results
Expected
Flags should be applied, no errors in terminal
Actual
Flags are not applied error in the console
Module build failed (from ./node_modules/swc-loader/src/index.js): Error: unknown field
keepClassnames, expected one ofprops,topLevel,keepClassNames,keepFnNames,keepPrivateProps,ie8,safari10,reservedat line 1 column 750
Update 1
Repository with min code needed to reproduce
https://github.com/kaczor6418/swc-flags-typo
Results:
-
After running
npm run buildat master branch:
-
After running
npm run buildat fixed-flags-names branch
Hi @kdy1 any update here? Can you reproduce this issue?
I'm finally back to this. The email was buried deep, but I successfully resolve all new tasks.
Yes I can reproduce
https://play.swc.rs/?version=1.2.206&code=H4sIAAAAAAAAA0vOzyvOz0nVy8lP11AvSS0uUde05gIA9hDhIRUAAAA%3D&config=H4sIAAAAAAAAA02OzWrDQAyE30XkGOy20B58LfTWN8hFrBXH7v6hWZOY4HevNglxbuKbGc1caQd3ksDU0amU3LXthBSbO0RJKk3SocXZqaM9ycX5uRdzHw7NhJ2hCY66K2VWiNYLSyx8MUtZssDpmIvZCgwd2UP21ItLyvYc1BWdZTWZdZBiIcHH2%2FunBXxKkGckjHE8LvW9SyGrAJvEcfBSpT%2BR%2FO0ZiBxkM1T884rW1RpD6ud7rO68NX%2FRujU9wiN%2BH8bb0n%2FIW6f7MQEAAA%3D%3D