Skip to content

Commit

Permalink
feat: add ESM builds for packages used in browser (open-telemetry#459)
Browse files Browse the repository at this point in the history
* feat: add ESM builds for packages used in browser

* fix(id-generator-aws-xray): missed including esm files
  • Loading branch information
t2t2 authored Apr 30, 2021
1 parent 6e09072 commit 00d13eb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
"version": "0.16.0",
"description": "OpenTelemetry AWS Xray propagator provides context propagation for systems that are using AWS X-Ray format.",
"main": "build/src/index.js",
"module": "build/esm/index.js",
"types": "build/src/index.d.ts",
"repository": "open-telemetry/opentelemetry-js-contrib",
"scripts": {
"precompile": "tsc --version",
"compile": "tsc --build",
"clean": "tsc --build --clean",
"compile": "tsc --build tsconfig.json tsconfig.esm.json",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json",
"test": "nyc ts-mocha -p tsconfig.json test/**/*.test.ts",
"test:browser": "nyc karma start --single-run",
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"version": "node ../../scripts/version-update.js",
"watch": "tsc --build --watch",
"watch": "tsc --build --watch tsconfig.json tsconfig.esm.json",
"prepare": "npm run compile"
},
"keywords": [
Expand All @@ -31,6 +32,9 @@
"node": ">=8.0.0"
},
"files": [
"build/esm/**/*.js",
"build/esm/**/*.js.map",
"build/esm/**/*.d.ts",
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts",
Expand Down
11 changes: 11 additions & 0 deletions tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.base.esm.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "build/esm",
"tsBuildInfoFile": "build/esm/tsconfig.esm.tsbuildinfo"
},
"include": [
"src/**/*.ts"
]
}

0 comments on commit 00d13eb

Please sign in to comment.