Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Add ESM build #25

Merged
merged 2 commits into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@
"version": "1.0.0-rc.0",
"description": "Public API for OpenTelemetry",
"main": "build/src/index.js",
"module": "build/esm/index.js",
"types": "build/src/index.d.ts",
"browser": {
"./src/platform/index.ts": "./src/platform/browser/index.ts",
"./build/esm/platform/index.js": "./build/esm/platform/browser/index.js",
"./build/src/platform/index.js": "./build/src/platform/browser/index.js"
},
"repository": "https://github.com/open-telemetry/opentelemetry-js-api.git",
"scripts": {
"build": "npm run compile",
"clean": "tsc --build --clean",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json",
"codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p .",
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p .",
"compile": "tsc --build",
"compile": "tsc --build tsconfig.json tsconfig.esm.json",
"docs": "typedoc",
"docs:deploy": "gh-pages --dist docs/out",
"docs:test": "linkinator docs/out --silent --skip david-dm.org",
Expand All @@ -40,6 +42,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
13 changes: 13 additions & 0 deletions tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ES6",
"moduleResolution": "node",
"outDir": "build/esm",
"rootDir": "src",
"tsBuildInfoFile": "build/esm/tsconfig.esm.tsbuildinfo"
},
"include": [
"src/**/*.ts"
],
}