Skip to content

Commit

Permalink
fix esm module
Browse files Browse the repository at this point in the history
  • Loading branch information
ishiko732 committed Nov 14, 2024
1 parent f406e5d commit 8770176
Show file tree
Hide file tree
Showing 6 changed files with 665 additions and 120 deletions.
19 changes: 0 additions & 19 deletions build.js

This file was deleted.

24 changes: 18 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,30 @@
"name": "example-ts-fsrs-koa2-endpoint",
"version": "0.0.1",
"type": "module",
"module": "./dist/index.mjs",
"types": "./dist/index.d.cts",
"exports": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
}
},
"description": "Example of running ts-fsrs with Koa on the Vercel platform.",
"scripts": {
"start": "export NODE_ENV=production; node ./dist/index.js",
"dev": "nodemon",
"lint": "eslint ./",
"build:esbuild": "node ./build.js"
"build:rm": "rm -rf dist/ && mkdir dist",
"build:cp": "cp node_modules/fsrs-browser/fsrs_browser_bg.wasm dist/ && cp package.json dist/ && cp pnpm-lock.yaml dist/",
"build:install": "cd dist/ && pnpm install --prod --frozen-lockfile",
"build": "pnpm run build:rm && pkgroll && pnpm run build:cp && pnpm run build:install"
},
"dependencies": {
"@fast-csv/parse": "^5.0.2",
"@types/koa": "^2.15.0",
"@types/koa-bodyparser": "^4.3.12",
"@types/koa-compose": "^3.2.8",
"@types/koa-router": "^7.4.8",
"dayjs": "^1.11.13",
"debug": "^4.3.7",
"dotenv": "^16.4.5",
Expand All @@ -23,19 +38,16 @@
},
"devDependencies": {
"@eslint/js": "^9.14.0",
"@types/koa": "^2.15.0",
"@types/koa-bodyparser": "^4.3.12",
"@types/koa-compose": "^3.2.8",
"@types/koa-router": "^7.4.8",
"@types/node": "^20.17.6",
"esbuild": "^0.24.0",
"esbuild-node-externals": "^1.15.0",
"eslint": "^9.14.0",
"eslint-config-prettier": "^9.1.0",
"globals": "^15.12.0",
"pkgroll": "^2.5.1",
"tsx": "^4.19.2",
"typescript": "^5.6.3",
"typescript-eslint": "^8.13.0"
"typescript-eslint": "^8.14.0"
},
"engines": {
"node": "20.x"
Expand Down
Loading

0 comments on commit 8770176

Please sign in to comment.