Skip to content

Commit

Permalink
packages/cli: target modern browsers and switch output to module
Browse files Browse the repository at this point in the history
  • Loading branch information
Rugvip committed May 1, 2020
1 parent 4c7a978 commit b87d266
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 16 deletions.
3 changes: 2 additions & 1 deletion packages/cli/config/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"noEmit": false,
"declarationMap": true,
"incremental": true,
"module": "es6",
"target": "ES2019",
"module": "ESNext",
"resolveJsonModule": true,
"esModuleInterop": true,
"types": ["node", "jest"]
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/commands/plugin/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import { paths } from 'lib/paths';
export default {
input: 'src/index.ts',
output: {
file: 'dist/index.cjs.js',
format: 'cjs',
file: 'dist/index.esm.js',
format: 'module',
},
plugins: [
peerDepsExternal({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "plugin-welcome",
"version": "0.0.0",
"main": "dist/index.cjs.js",
"main": "dist/index.esm.js",
"types": "dist/index.d.ts",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/templates/default-plugin/package.json.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@backstage/plugin-{{id}}",
"version": "{{version}}",
"main": "dist/index.cjs.js",
"main": "dist/index.esm.js",
"types": "dist/index.d.ts",
"license": "Apache-2.0",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"backstage"
],
"license": "Apache-2.0",
"main": "dist/index.cjs.js",
"main": "dist/index.esm.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "backstage-cli plugin:build",
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"backstage"
],
"license": "Apache-2.0",
"main": "dist/index.cjs.js",
"main": "dist/index.esm.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "backstage-cli plugin:build",
Expand Down
2 changes: 1 addition & 1 deletion packages/test-utils-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"backstage"
],
"license": "Apache-2.0",
"main": "dist/index.cjs.js",
"main": "dist/index.esm.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "backstage-cli plugin:build",
Expand Down
2 changes: 1 addition & 1 deletion packages/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"backstage"
],
"license": "Apache-2.0",
"main": "dist/index.cjs.js",
"main": "dist/index.esm.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "backstage-cli plugin:build",
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"backstage"
],
"license": "Apache-2.0",
"main": "dist/index.cjs.js",
"main": "dist/index.esm.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "backstage-cli plugin:build",
Expand Down
2 changes: 1 addition & 1 deletion plugins/graphiql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"backstage"
],
"license": "Apache-2.0",
"main": "dist/index.cjs.js",
"main": "dist/index.esm.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "backstage-cli plugin:build",
Expand Down
2 changes: 1 addition & 1 deletion plugins/home-page/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@backstage/plugin-home-page",
"version": "0.1.1-alpha.4",
"main": "dist/index.cjs.js",
"main": "dist/index.esm.js",
"types": "dist/index.d.ts",
"license": "Apache-2.0",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion plugins/inventory/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@backstage/plugin-inventory",
"version": "0.1.1-alpha.4",
"main": "dist/index.cjs.js",
"main": "dist/index.esm.js",
"types": "dist/index.d.ts",
"license": "Apache-2.0",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion plugins/lighthouse/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@backstage/plugin-lighthouse",
"version": "0.1.1-alpha.4",
"main": "dist/index.cjs.js",
"main": "dist/index.esm.js",
"types": "dist/index.d.ts",
"license": "Apache-2.0",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion plugins/tech-radar/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@backstage/plugin-tech-radar",
"version": "0.1.1-alpha.4",
"main": "dist/index.cjs.js",
"main": "dist/index.esm.js",
"types": "dist/index.d.ts",
"license": "Apache-2.0",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion plugins/welcome/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@backstage/plugin-welcome",
"version": "0.1.1-alpha.4",
"main": "dist/index.cjs.js",
"main": "dist/index.esm.js",
"types": "dist/index.d.ts",
"private": true,
"license": "Apache-2.0",
Expand Down

0 comments on commit b87d266

Please sign in to comment.