When a project imports an npm library using Conditional Exports, it looks that forge deploy
lets Webpack refer to the browser-variant location.
For example, with the sample project GitHub - ymkjp/forge-20210530, it shows the following error when packaging app files:
$ forge --version
1.3.4
$ forge deploy
...
Field 'browser' doesn't contain a valid alias configuration
^ the full output is available at README.md
.
This is seemingly because the imported library has the following exports configuration in package.json
:
"./jwk/parse": {
"browser": "./dist/browser/jwk/parse.js",
"import": "./dist/node/esm/jwk/parse.js",
"require": "./dist/node/cjs/jwk/parse.js"
},
ref. jose/package.json at 34ee14955f3c5d5215b6eeeae315bf271cf9dd55 · panva/jose · GitHub
Is there any way to let the deployment command refer to the import-variant location?