Prevent Minimizing/Optimizing Webpack Folder | Community
Skip to main content
Level 2
October 15, 2023

Prevent Minimizing/Optimizing Webpack Folder

  • October 15, 2023
  • 2 replies
  • 987 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

arunpatidar
Community Advisor
Community Advisor
October 16, 2023
Level 2
October 19, 2023

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.

kautuk_sahni
Community Manager
Community Manager
October 16, 2023

@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.

Kautuk Sahni