Chore: Shared webpack: Fix package.json version with commit (#77030)

This commit is contained in:
Andres Martinez Gotor
2023-10-25 16:37:59 +02:00
committed by GitHub
parent 5d44240fca
commit a080ede871

View File

@@ -179,6 +179,18 @@ const config = async (env: Record<string, unknown>): Promise<Configuration> => {
},
],
},
{
dir: path.resolve(DIST_DIR),
files: ['package.json'],
rules: [
{
search: `"version": "${getPackageJson().version}"`,
replace: env.commit
? `"version": "${getPackageJson().version}-${env.commit}"`
: `"version": "${getPackageJson().version}"`,
},
],
},
]),
env.development
? new ForkTsCheckerWebpackPlugin({