Skip to content

Commit

Permalink
Merge pull request #105 from FredKSchott/esm-module
Browse files Browse the repository at this point in the history
add "module" entrypoint, replace esnext with es2020
  • Loading branch information
bcherny authored Feb 22, 2020
2 parents f14a8df + 580a360 commit 90fb013
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.DS_Store
dist
dist.esnext
dist.esm
node_modules
perf/filesize/bundle.js
yarn-error.log
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "5.1.1",
"description": "Dead simple state management for React",
"main": "dist/src/index.js",
"main:esnext": "dist.esnext/index.js",
"module": "dist.esm/index.js",
"main:esnext": "dist.esm/index.js",
"typings": "dist/src/index.d.ts",
"author": "Boris Cherny <[email protected]>",
"license": "MIT",
Expand All @@ -16,9 +17,9 @@
},
"homepage": "https://github.com/bcherny/undux#readme",
"scripts": {
"build": "npm run clean && npm run lint && tsc -d && npm run build:esnext && flow focus-check src/index.js.flow && cp src/index.js.flow dist/src/index.js.flow",
"build:esnext": "tsc -d -p ./tsconfig.esnext.json",
"clean": "shx rm -rf dist dist.esnext",
"build": "npm run clean && npm run lint && tsc -d && npm run build:esm && flow focus-check src/index.js.flow && cp src/index.js.flow dist/src/index.js.flow",
"build:esm": "tsc -d -p ./tsconfig.esm.json",
"clean": "shx rm -rf dist dist.esm",
"format": "prettier --write src/* src/**/* test/**/*",
"lint": "eslint ./src/**/*",
"profile:filesize": "webpack --config ./perf/filesize/webpack.config.js -p && cat ./perf/filesize/bundle.js | gzip | wc -c",
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.esnext.json → tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"module": "esnext",
"moduleResolution": "node",
"newLine": "LF",
"outDir": "dist.esnext",
"outDir": "dist.esm",
"preserveConstEnums": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"target": "esnext",
"target": "es2020",
"paths": {
"typed-rx-emitter": ["node_modules/typed-rx-emitter/dist.esnext"]
}
Expand Down

0 comments on commit 90fb013

Please sign in to comment.