packages/cli,config,config-loader: point straight to src and build with build

This commit is contained in:
Patrik Oldsberg
2020-06-04 11:41:44 +02:00
parent f2c77a8239
commit c5425c5664
3 changed files with 9 additions and 6 deletions
+5
View File
@@ -194,6 +194,11 @@ export async function installWithLocalDeps(dir: string) {
delete depJson['main:src'];
depJson.types = 'dist/index.d.ts';
// Ugly hack until backend packages can point straight to source
if (name === 'config' || name === 'config-loader') {
depJson.main = 'dist/index.cjs.js';
}
await fs
.writeJSON(depJsonPath, depJson, { encoding: 'utf8', spaces: 2 })
.catch(error => {
+2 -3
View File
@@ -16,11 +16,10 @@
"backstage"
],
"license": "Apache-2.0",
"main": "dist/index.esm.js",
"main:src": "src/index.ts",
"main": "src/index.ts",
"types": "src/index.ts",
"scripts": {
"build": "backstage-cli plugin:build",
"build": "backstage-cli build",
"lint": "backstage-cli lint",
"test": "backstage-cli test",
"prepack": "backstage-cli prepack",
+2 -3
View File
@@ -16,11 +16,10 @@
"backstage"
],
"license": "Apache-2.0",
"main": "dist/index.esm.js",
"main:src": "src/index.ts",
"main": "src/index.ts",
"types": "src/index.ts",
"scripts": {
"build": "backstage-cli plugin:build",
"build": "backstage-cli build",
"lint": "backstage-cli lint",
"test": "backstage-cli test",
"prepack": "backstage-cli prepack",