Open mischnic opened 2 years ago
"engines": {
"node": ">=16",
},
"targets": {
"default": {
"engines": {
"browsers": "> 0.5%, last 2 versions, not dead"
}
}
},
"browserslist": "> 0.5%, last 2 versions, not dead",
It should be reading off of browsersList but if a top level engines is defined, then a targets.defaults needs an engines as well, which is a possible duplicate of browsersList.
The "problem" in that case is that either "engines.node"
or "browserslist"
needs to have a higher precedence to make the default target a node or browser target. I'm actually not sure if browserslist or engines.node wins at the moment
As explained in the linked ticket, you can hit this case even for things that aren't node apps at all, because some environments use the package.json
engines
section to figure out what node version to use for the project (even if only to run Parcel itself!).
Adding
engines.node
causes "External modules are not supported when building for browser".So you need to do