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
Remove description about `id` 0 as this `module.id` doesn't
necessarily mean it is an entry point as it can be affected by
various plugins and the `--optimize-module-order` flag.
Synchronously retrieve a module's ID. The compiler will ensure that the dependency is available in the output bundle. See [`module.id`](/api/module-variables#module-id-commonjs-) for more information.
128
128
129
-
```javascript
130
-
var id =require.resolve("dependency");
131
-
typeof id ==="number";
132
-
id ===0// if dependency is the entry point
133
-
id >0// elsewise
134
-
```
135
-
136
129
W> Module ID is a number in webpack (in contrast to NodeJS where it is a string -- the filename).
0 commit comments