Skip to content

Commit 0575d03

Browse files
committed
configure ott-common to export the correct files in the right environment
1 parent 249341c commit 0575d03

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

common/package.json

+14-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,21 @@
22
"name": "ott-common",
33
"version": "0.10.0",
44
"license": "AGPL-3.0-or-later",
5-
"module": "es2020",
65
"type": "module",
6+
"module": "index.ts",
7+
"files": [
8+
"*"
9+
],
10+
"exports": {
11+
".": {
12+
"lean": "./ts-out/index.js",
13+
"default": "./index.ts"
14+
},
15+
"./*": {
16+
"lean": "./ts-out/*",
17+
"default": "./*"
18+
}
19+
},
720
"scripts": {
821
"build": "tsc",
922
"lint": "tsc --noEmit && eslint --ext .js,.ts --fix .",

server/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"module": "esnext",
77
"scripts": {
88
"start": "node --experimental-specifier-resolution=node --loader ts-node/esm app.ts",
9-
"start-lean": "node --experimental-specifier-resolution=node --optimize-for-size --max-old-space-size=200 ts-out/server/app.js",
9+
"start-lean": "node --experimental-specifier-resolution=node --optimize-for-size --max-old-space-size=200 --conditions=lean ts-out/app.js",
1010
"debug": "nodemon --exec node --experimental-specifier-resolution=node --loader ts-node/esm --ignore 'tests/*' --inspect -e ts,js app.ts",
1111
"build": "tsc",
1212
"lint": "tsc --noEmit && eslint --fix .",

0 commit comments

Comments
 (0)