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
-`true`: The filename of the **input** file relative to the [`context` option](/configuration/entry-context/#context).
61
62
-`false`: Webpack won't touch your `__filename` code, which means you have the regular Node.js `__filename` behavior. The filename of the **output** file when run in a Node.js environment.
62
63
-`'mock'`: The fixed value `'/index.js'`.
63
64
-`'warn-mock'`: Use the fixed value of `'/index.js'` but show a warning.
65
+
-`node_module`: Replace `__filename` in CommonJS modules to `fileURLToPath(import.meta.url)` when `output.module` is enabled.
-`true`: The dirname of the **input** file relative to the [`context` option](/configuration/entry-context/#context).
73
75
-`false`: Webpack won't touch your `__dirname` code, which means you have the regular Node.js `__dirname` behavior. The dirname of the **output** file when run in a Node.js environment.
74
76
-`'mock'`: The fixed value `'/'`.
75
77
-`'warn-mock'`: Use the fixed value of `'/'` but show a warning.
78
+
-`node_module`: Replace `__dirname` in CommonJS modules to `fileURLToPath(import.meta.url + "/..")` when `output.module` is enabled.
0 commit comments