cli,create-app: bump esbuild + remove resolutions override in create-app

This commit is contained in:
Patrik Oldsberg
2020-11-28 17:02:02 +01:00
parent 3f947b70d1
commit 4a655c89db
6 changed files with 61 additions and 14 deletions
+2 -2
View File
@@ -59,7 +59,7 @@
"css-loader": "^3.5.3",
"dashify": "^2.0.0",
"diff": "^4.0.2",
"esbuild": "^0.7.7",
"esbuild": "^0.8.16",
"eslint": "^7.1.0",
"eslint-config-prettier": "^6.0.0",
"eslint-formatter-friendly": "^7.0.0",
@@ -88,7 +88,7 @@
"replace-in-file": "^6.0.0",
"rollup": "2.33.x",
"rollup-plugin-dts": "1.4.13",
"rollup-plugin-esbuild": "2.3.x",
"rollup-plugin-esbuild": "2.6.x",
"rollup-plugin-peer-deps-external": "^2.2.2",
"rollup-plugin-postcss": "^3.1.1",
"rollup-plugin-typescript2": "^0.27.3",
+17
View File
@@ -83,6 +83,23 @@ async function build(config: RollupOptions) {
}
export const buildPackage = async (options: BuildOptions) => {
try {
const { resolutions } = await fs.readJson(
paths.resolveTargetRoot('package.json'),
);
if (resolutions?.esbuild) {
console.warn(
chalk.red(
'Your root package.json contains a "resolutions" entry for "esbuild". This was ' +
'included in older @backstage/create-app templates in order to work around build ' +
'issues that have since been fixed. Please remove the entry and run `yarn install`',
),
);
}
} catch {
/* Errors ignored, this is just a warning */
}
const configs = await makeConfigs(options);
await fs.remove(paths.resolveTarget('dist'));
await Promise.all(configs.map(build));