The content of this section is derived from the content of the following links and is subject to the CC BY 4.0 license.
The following contents can be assumed to be the result of modifications and deletions based on the original contents if not specifically stated.
This section covers all variables available in code compiled with webpack. Modules will have access to certain data from the compilation process through module
and other variables.
Indicates whether or not Hot Module Replacement is enabled and provides an interface to the process. See the HMR API page for details.
An alias for module.hot
, however import.meta.webpackHot
can be used in strict ESM while module.hot
can't.
Depending on the configuration option node.__dirname
:
false
: Not definedmock
: equal to '/'
true
: node.js __dirnameIf used inside an expression that is parsed by the Parser, the configuration option is treated as true
.
The resource query of the current module. If the following require
call was made, then the query string would be available in file.js
.
Access to the internal object of all modules.
It provides access to the hash of the compilation.
Equals the configuration option's output.publicPath
.
Access to name of current chunk.
Access the runtime id of current entry.