Skip to content

Commit

Permalink
build: pointing main reference to es5 bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
willmendesneto committed Nov 6, 2019
1 parent 3a52af1 commit 1ae2c97
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased][]

### Updated

- Updated `main` entry point in `package.json` to point to `cjs` bundle content

### Fixed

- Updated bundle size for UMD module
Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
"url": "https://github.com/willmendesneto/perf-marks.git"
},
"license": "MIT",
"main": "dist/umd/index.js",
"jsnext:main": "dist/es2015/index.js",
"module": "dist/es2015/index.js",
"browser": "dist/umd/index.js",
"jsnext:main": "dist/esm/index.js",
"module": "dist/esm/index.js",
"main": "dist/cjs/index.js",
"es2015": "dist/cjs/index.js",
"cjs": "dist/cjs/index.js",
"types": "dist/umd/index.d.ts",
"keywords": [
Expand Down Expand Up @@ -62,9 +64,9 @@
"clean": "rm -rf ./dist ./.jest ./coverage ./lib ./marks.* ./entries.*",
"clean:entrypoints": "rm -rf ./marks.* ./entries.*",
"build": "yarn build:es2015 && yarn build:cjs && yarn build:esm && yarn build:umd && yarn build:entrypoints:clean && yarn build:entrypoints",
"build:umd": "tsc --module esnext --target ES5 --outDir dist/umd && babel dist/umd --out-dir dist/umd",
"build:umd": "tsc --module esnext --target es5 --outDir dist/umd && babel dist/umd --out-dir dist/umd",
"build:es2015": "tsc --module es2015 --target es2015 --outDir dist/es2015",
"build:esm": "tsc --module esnext --target esnext --outDir dist/esm",
"build:esm": "tsc --module esnext --target es5 --outDir dist/esm",
"build:cjs": "tsc --module commonjs --target es5 --outDir dist/cjs",
"build:entrypoints:clean": "rm -rf ./dist/umd/entrypoints ./dist/cjs/entrypoints ./dist/es2015/entrypoints",
"build:entrypoints": "node ./scripts/build-entrypoints.js",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/* Basic Options */
"module": "commonjs",
// "module": "esnext",
"lib": ["es2018", "dom", "es5"],
"lib": ["es2018", "dom", "es5", "scripthost"],
"emitDecoratorMetadata": true,
"typeRoots": ["node_modules/@types"],
// "lib": ["es2018", "dom"],
Expand Down

0 comments on commit 1ae2c97

Please sign in to comment.