mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Avoid copying package.json into dist folder (#80278)
This commit is contained in:
committed by
GitHub
parent
ee7daeb2a7
commit
42f1059bc9
@@ -17,6 +17,10 @@ function skipFiles(f: string): boolean {
|
||||
// avoid copying tsconfig.json
|
||||
return false;
|
||||
}
|
||||
if (f.includes('/package.json')) {
|
||||
// avoid copying package.json
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -179,18 +183,6 @@ 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({
|
||||
|
Reference in New Issue
Block a user