Purpose of exclude: /node_modules
in webpack.config.js
#56840
jlandrum
started this conversation in
Developer Experience
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have built a tool for generating block-based themes that currently uses @wordpress/scripts. During development, all has been fine, but I just got a new computer and decided to install my tool as a user normally would (in this case,
bun install -g
)I noticed in doing this, babel-loader isn't loaded, and as a result no .ts/tsx files are being properly handled (with an error that there are no loaders). In testing, it appears removing
exclude: /node_modules
from webpack.config.js solves this, so I'm curious if anyone can give some insight into why this line exists / what its intended purpose is.I wouldn't want to suggest removing something that likely was put there for a reason, but if it doesn't impact the typical use of the scripts while blocking use from within dependencies, I'm curious if it's worth removing.
Beta Was this translation helpful? Give feedback.
All reactions