browserify
browserify copied to clipboard
`browserField: false` makes browserify ignore the transform option
Hi,
if browserField: false (or implicitly node: true) is set, then the browserify.transform option of dependencies is ignored. In our case there is a
"browserify": {
"transform": [
[
"babelify"
]
]
},
in some of our dependencie's package.json files, it's used to compile esm and jsx to cjs. I obliviously want to do that transformation when i bundle for node.
Definitely a bug. The purpose of browserField: false, I would have thought, is to ignore the "browser" field in dependencies' package.json when resolving module entrypoints. This has nothing to do with whether or not we want to honour the "browserify.transform" field.