-
-
Notifications
You must be signed in to change notification settings - Fork 314
Open
Description
For example, trying to import [email protected]
will fail because the node export will be resolved. Here's excerpt from the package.json
{
"name": "nanoid",
"exports": {
".": {
"browser": "./index.browser.js",
"default": "./index.js"
},
"./non-secure": "./non-secure/index.js",
"./package.json": "./package.json"
},
"browser": {
"./index.js": "./index.browser.js"
},
"react-native": {
"./index.js": "./index.browser.js"
}
}
The fix appears to add browser
to node resolve plugin
export default {
nodeResolve: {
exportConditions: ['browser', 'module', 'import', 'default'],
}
}
I think this could be made the default when setting nodeResolve: true
Metadata
Metadata
Assignees
Labels
No labels