Skip to content

Commit 7d63fc7

Browse files
authored
remove fsrs-browser (#56)
* remove fsrs-browser * update postinstall * fix bcrypt & go to fsrs-online-training
1 parent c3a6cbc commit 7d63fc7

File tree

20 files changed

+31
-1028
lines changed

20 files changed

+31
-1028
lines changed

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"WillLuke.nextjs.addTypesOnSave": true,
3+
"WillLuke.nextjs.hasPrompted": true
4+
}

next.config.mjs

Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,55 +3,25 @@ const nextConfig = {
33
images: {
44
remotePatterns: [
55
{
6-
protocol: "https",
7-
hostname: "avatars.githubusercontent.com",
8-
port: "",
9-
pathname: "/u/**",
6+
protocol: 'https',
7+
hostname: 'avatars.githubusercontent.com',
8+
port: '',
9+
pathname: '/u/**',
1010
},
1111
],
1212
},
1313
async rewrites() {
1414
return {
1515
fallback: [
1616
{
17-
source: "/lingq/:path*",
17+
source: '/lingq/:path*',
1818
destination: 'https://www.lingq.com/:path*',
19-
}
20-
]
21-
}
19+
},
20+
],
21+
};
2222
},
23-
// compiler: {
24-
// removeConsole: process.env.NODE_ENV === "production",
25-
// },
26-
webpack(config, { isServer, dev }) {
27-
// Use the client static directory in the server bundle and prod mode
28-
// Fixes `Error occurred prerendering page "/"`
29-
config.output.webassemblyModuleFilename =
30-
isServer && !dev
31-
? "../static/wasm/[modulehash].wasm"
32-
: "static/wasm/[modulehash].wasm";
33-
34-
// Since Webpack 5 doesn't enable WebAssembly by default, we should do it manually
35-
config.experiments = { ...config.experiments, asyncWebAssembly: true };
36-
37-
return config;
38-
},
39-
async headers() {
40-
return [
41-
{
42-
source: "/(.*)",
43-
headers: [
44-
{
45-
key: "Cross-Origin-Embedder-Policy",
46-
value: "require-corp",
47-
},
48-
{
49-
key: "Cross-Origin-Opener-Policy",
50-
value: "same-origin",
51-
},
52-
],
53-
},
54-
];
23+
compiler: {
24+
removeConsole: process.env.NODE_ENV === 'production',
5525
},
5626
};
5727
export default nextConfig;

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"db:push": "npx prisma db push",
1313
"db:generate": "npx prisma generate",
1414
"db:init": "npx prisma migrate dev --name init",
15-
"postinstall": "prisma generate && node ./postinstall.js"
15+
"postinstall": "prisma generate"
1616
},
1717
"dependencies": {
1818
"@hookform/resolvers": "^3.6.0",
@@ -42,7 +42,6 @@
4242
"class-variance-authority": "^0.7.0",
4343
"clsx": "^2.1.1",
4444
"cmdk": "^1.0.0",
45-
"fsrs-browser": "^1.1.4",
4645
"lucide-react": "^0.395.0",
4746
"next": "14.2.21",
4847
"next-auth": "^4.24.7",
@@ -75,5 +74,10 @@
7574
},
7675
"prisma": {
7776
"schema": "src/prisma/schema.prisma"
77+
},
78+
"pnpm": {
79+
"onlyBuiltDependencies": [
80+
"bcrypt"
81+
]
7882
}
79-
}
83+
}

pnpm-lock.yaml

Lines changed: 6 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

postinstall.js

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

public/fsrs_browser_bg.wasm

-966 KB
Binary file not shown.

src/app/api/fsrs/train/route.ts

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

src/app/api/fsrs/train/train.ts

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

src/app/api/fsrs/train/type.d.ts

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

0 commit comments

Comments
 (0)