From 73b918f7038e12e00c74bd658867abd8beec0256 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Tue, 1 Feb 2022 18:51:54 +0530 Subject: [PATCH] docs(api): add `__webpack_module__` and `__webpack_module__.id` --- src/content/api/module-variables.mdx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/content/api/module-variables.mdx b/src/content/api/module-variables.mdx index cd941f43d6b7..9146e134d1d3 100644 --- a/src/content/api/module-variables.mdx +++ b/src/content/api/module-variables.mdx @@ -13,6 +13,7 @@ contributors: - anikethsaha - chenxsan - jamesgeorge007 + - snitin315 related: - title: CommonJS url: https://en.wikipedia.org/wiki/CommonJS @@ -164,6 +165,18 @@ import('./module-a').then((moduleA) => { }); ``` +## \_\_webpack_module\_\_ (webpack-specific) + + + +It provides access to the the current `module`. `module` is not available in strict ESM. + +## \_\_webpack_module\_\_.id (webpack-specific) + + + +It provides access to the ID of current `module` (`module.id`). `module` is not available in strict ESM. + ## \_\_webpack_modules\_\_ (webpack-specific) Access to the internal object of all modules.