Skip to content

Commit

Permalink
feat: update package.json exports field
Browse files Browse the repository at this point in the history
  • Loading branch information
fox1t committed Sep 22, 2023
1 parent 4d299b3 commit 17f9c6f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ EXPOSE 3000
ENV NODE_ENV=production

ENTRYPOINT ["dumb-init"]
CMD ["node", "--enable-source-maps", "build/index.js"]
CMD ["node", "--enable-source-maps", "dist/index.js"]
4 changes: 2 additions & 2 deletions docs/running-in-lambda.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ Create a new package for your Lambda handler, and add `turborepo-remote-cache`
as a dependency. Your `index.js` handler code should look like this:

```js
export { handler } from 'turborepo-remote-cache/build/aws-lambda';
export { handler } from 'turborepo-remote-cache/aws-lambda';
```

*Note - You will need to bundle dependencies and upload the handler code. How
you choose to do this is outside the scope of this guide, but one method to
consider is using `esbuild`:*

```
esbuild src/index.js --bundle --platform=node --outfile=build/index.js
esbuild src/index.js --bundle --platform=node --outfile=dist/index.js
```

### Configuration
Expand Down
25 changes: 14 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,19 @@
"name": "turborepo-remote-cache",
"version": "1.15.1",
"description": "Turborepo remote cache server",
"main": "./dist/index.js",
"main": "./dist/app.js",
"type": "module",
"exports": {
".": {
"import": "./dist/app.js",
"require": "./dist/app.js"
},
"./aws-lambda": {
"import": "./dist/aws-lambda.js",
"require": "./dist/aws-lambda.js"
},
"./package.json": "./package.json"
},
"author": "Maksim Sinik <[email protected]>",
"license": "MIT",
"bin": {
Expand Down Expand Up @@ -87,14 +98,6 @@
"node": ">=18.0.0"
},
"packageManager": "[email protected]",
"keywords": [
"turborepo",
"monorepo",
"remote",
"cache"
],
"files": [
"dist",
"vercel.json"
]
"keywords": ["turborepo", "monorepo", "remote", "cache"],
"files": ["dist", "vercel.json"]
}

0 comments on commit 17f9c6f

Please sign in to comment.