diff --git a/src/content/plugins/environment-plugin.mdx b/src/content/plugins/environment-plugin.mdx index fa2cb2508fbe..160fb7089da1 100644 --- a/src/content/plugins/environment-plugin.mdx +++ b/src/content/plugins/environment-plugin.mdx @@ -94,10 +94,10 @@ if ("false") { The following `EnvironmentPlugin` configuration provides `process.env.GIT_VERSION` (such as "v5.4.0-2-g25139f57f") and `process.env.GIT_AUTHOR_DATE` (such as "2020-11-04T12:25:16+01:00") corresponding to the last Git commit of the repository: ```javascript -const child_process = require("node:child_process"); +import childProcess from "node:child_process"; function git(command) { - return child_process.execSync(`git ${command}`, { encoding: "utf8" }).trim(); + return childProcess.execSync(`git ${command}`, { encoding: "utf8" }).trim(); } new webpack.EnvironmentPlugin({