Skip to content

Commit bfcde50

Browse files
committed
build api with esbuild, remove babel
1 parent ce7fe08 commit bfcde50

7 files changed

Lines changed: 247 additions & 1143 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ client/.next
55
data/
66
config.js
77
.DS_Store
8+
dist/

api/.babelrc

Lines changed: 0 additions & 5 deletions
This file was deleted.

api/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ FROM node:16-alpine
22
ENV NODE_ENV=production
33
ENV SENTRY_DSN="https://9b9761216607428180ea3b32bd1c8e58@o140996.ingest.sentry.io/4504645996576768"
44
LABEL org.opencontainers.image.source=https://github.com/tdjsnelling/sqtracker
5-
WORKDIR /sqtracker/app
5+
WORKDIR /sqtracker/api
66
COPY . .
7-
RUN yarn
7+
RUN yarn install
8+
RUN yarn build
89
EXPOSE 3001
9-
CMD yarn start
10+
CMD yarn start

api/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
{
22
"name": "@sqtracker/api",
3-
"version": "1.0.0-beta.1",
3+
"version": "1.0.0-beta.2",
44
"private": true,
55
"license": "GPL-3.0-only",
6+
"type": "module",
67
"scripts": {
7-
"dev": "nodemon --exec babel-node src/index.js",
8-
"start": "babel-node src/index.js"
8+
"build": "esbuild src/index.js --bundle --platform=node --target=node16 --format=esm --packages=external --outdir=dist",
9+
"start": "node dist/index.js",
10+
"dev": "conc \"yarn build --watch\" \"nodemon dist/index.js\""
911
},
1012
"dependencies": {
1113
"@sentry/node": "^7.36.0",
@@ -17,6 +19,7 @@
1719
"cookie-parser": "^1.4.6",
1820
"cors": "^2.8.5",
1921
"dotenv": "^10.0.0",
22+
"esbuild": "^0.17.8",
2023
"express": "^4.17.1",
2124
"http-proxy-middleware": "^2.0.1",
2225
"jsonwebtoken": "^8.5.1",
@@ -33,9 +36,7 @@
3336
"yup": "^0.32.11"
3437
},
3538
"devDependencies": {
36-
"@babel/core": "^7.14.6",
37-
"@babel/node": "^7.14.7",
38-
"@babel/preset-env": "^7.14.7",
39+
"concurrently": "^7.6.0",
3940
"eslint": "^7.30.0",
4041
"eslint-config-prettier": "^8.3.0",
4142
"eslint-plugin-prettier": "^3.4.0",

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sqtracker/client",
3-
"version": "1.0.0-beta.1",
3+
"version": "1.0.0-beta.2",
44
"private": true,
55
"license": "GPL-3.0-only",
66
"scripts": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sqtracker",
3-
"version": "1.0.0-beta.1",
3+
"version": "1.0.0-beta.2",
44
"private": true,
55
"license": "GPL-3.0-only",
66
"workspaces": [

yarn.lock

Lines changed: 233 additions & 1127 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)