Keycloakify + Webpack #424
Replies: 3 comments 1 reply
-
Hi Sergey, FYI @garronej is real Keycloakify author, i'm just a contributor :) Thanks for detailed issue and explanations, this should help get answers. i have no ideas on that topic myself though. good luck ! |
Beta Was this translation helpful? Give feedback.
-
Hey @garronej, In the continuation of your answer in PR #423.
|
Beta Was this translation helpful? Give feedback.
-
Hello @zavoloklom, Apologies for the delayed response.
Absolutely, I believe this could be a very valuable resource for the community. However, the current community demand is primarily focused on Vite support. As a result, my efforts on the project will be directed toward that goal. That said, I am more than willing to reference any valuable resources you've created. Feel free to reach out on Discord if you have questions or need help!
I agree, this issue is not critical at the moment.
Yes, creating plugins for different bundlers like Webpack and Vite seems like a sensible approach. Given that the project has now amassed a significant user base, it might be the right time to revisit this topic. Furthermore, we're now in the post-GPT-4 era, making these kinds of tasks less time-consuming than before. |
Beta Was this translation helpful? Give feedback.
-
Hey @revolunet,
First up, big thanks for Keycloakify! I've been using it at work, and it's been really helpful.
I recently tried transitioning from
React Scripts 4
toWebpack 5
and ran into a couple of issues. I attempted to keep the configuration as close to the original as possible, while omitting a few plugins that didn't seem essential.One thing that stood out was an issue with the runtime script. I believe there's a problem with the RegExp in this replacer.
After some digging, I also noticed a pattern in current RCA5 example after adding my browserlist config. My current setup is:
You can reproduce this problem here.
The output I get is looking like this, but replacer was aiming for something like this.
If I adjust
>1%
to>0.2%
or even lower, or if I remove thenot op_mini all
, everything seems to work fine. So I guess difference is depending on arrow functions support.Could this be related to issue #416?
I've create a PR #423 with an updated RegExp. It works for the cases I've listed below and the "not op_mini all" option in the browserlist.
I'm also familiar with issue #384, so I've created a working example of a webpack configuration and expanded the description to address the challenges I encountered in process. In this repo, I've explored:
babel-loader
from rca5 +terser
minificationts-loader
+terser
minificationesbuild-loader
+esbuild
minificationPerhaps you'd want to take a look? With your expertise and some fine-tuning, we could craft this into a valuable resource for the community. I hope it could serve as a helpful reference, especially for those navigating similar configurations. If you'd like it, I can transfer this repo to your project or make PR to keycloakify-starter with one of configurations.
Thanks for your time!
Beta Was this translation helpful? Give feedback.
All reactions