DEV Community

Discussion on: Getting speed back, my Webpack debugging journey

Collapse
 
alexbryant profile image
alexbryant

Hi John, can you expand on the steps you took here?

"With this in mind I looked at the webpack configuration and saw that js / jsx and ts / tsx files were not limited to a folder. That could mean that every module file is put through the loader. I updated the settings to make sure paths were defined where possible."

After exploring the webpack folders in node_modules I'm still unsure of where to find this configuration for js/jsx and ts/tsx, but if I did I am unsure of what exactly to limit it to - would it be limiting it to the src folder?

Thanks for your article!

Collapse
 
jhotterbeekx profile image
John Hotterbeekx

In the section Module / Loaders, you can either specify an include or exlude option to define which files it should process. What this should be depends on your folder structure, but usually setting it to only the 'src' folder is what I would recommend.

Collapse
 
alexbryant profile image
alexbryant

Great, thank you!