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
It is possible to define variables with values that rely on files and will be re-evaluated when such files change in the file system. This means webpack will rebuild when such watched files change.
103
103
104
-
Arguments:
104
+
There're two arguments for `webpack.DefinePlugin.runtimeValue` function:
105
105
106
-
- The first argument of the `webpack.DefinePlugin.runtimeValue` is a `function` that should return the value to be assigned to the definition.
107
-
- The second argument is an array of file paths to watch for. Pass `true` instead of `[string]` here to flag the module as uncacheable.
106
+
- The first argument is a `function(module, key, version)` that should return the value to be assigned to the definition.
107
+
- The second argument could either be an array of file paths to watch for or a `true` to flag the module as uncacheable. Since 5.26.0, it can also take an object argument with the following properties:
108
+
109
+
-`fileDependencies?: string[]` A list of files the function depends on.
110
+
-`contextDependencies?: string[]` A list of directories the function depends on.
111
+
-`missingDependencies?: string[]` A list of not existing files the function depends on.
112
+
-`buildDependencies?: string[]` A list of build dependencies the function depends on.
113
+
-`version?: string | () => string` A version of the function.
0 commit comments