undefined
This config will determine which field of package.json
you use to import the npm
module. Same as the resolve.mainFields config of webpack.
When you build multiple targets at the same time, you can set different mainFields for different targets. At this point, you need to set resolveMainFields
to an object whose key is the corresponding build target.
For example to set different mainFields for web
and node
: