Hi,
I am trying to exclude the dependencies folder in ui.frontend from being minimized/optimized via Webpack, but I am unable to, I updated this line to this, but with no effect.
minimizer: [
new TerserPlugin({
exclude: /src\/main\/webpack\/dependencies/,
}),
Use case, is that whatever added to dependencies should not be minimized as it causes issues with method when used elsewhere.
Does anyone have a solution to exclude a path of JS files from being minimized/optimized/compiled by webpack?
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi,
There are 2 places where the minimization is possible.
1. In webpack - https://github.com/arunpatidar02/com.aemlab.junitapp/blob/master/ui.frontend/webpack.prod.js
2. In AEM - https://github.com/arunpatidar02/com.aemlab.junitapp/blob/master/ui.frontend/clientlib.config.js#L15
For webpack, please check https://webpack.js.org/plugins/terser-webpack-plugin/
Hi arunpatidar,
I actually tried all that before creating this topic.
Is there any straightforward way to only exclude one folder from being minimized.
BTW, to my understanding AEM Clientlib JS Config file, does not actually do any optimization.
Thanks.
@joe_17382226 Did you find the suggestions from Arun helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies