You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After this plugin resolved an import id to its target file in `node_modules`, it will invoke `this.resolve` again with the resolved id. It will pass the following information in the resolve options:
240
+
241
+
```js
242
+
this.resolve(resolved.id, importer, {
243
+
custom: {
244
+
'node-resolve': {
245
+
resolved, // the object with information from node.js resolve
246
+
importee // the original import id
247
+
}
248
+
}
249
+
});
250
+
```
251
+
252
+
Your plugin can use the `importee` information to map an original import to its resolved file in `node_modules`, in a plugin hook such as `resolveId`.
253
+
254
+
The `resolved` object contains the resolved id, which is passed as the first parameter. It also has a property `moduleSideEffects`, which may contain the value from the npm `package.json` field `sideEffects` or `null`.
0 commit comments