Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

chore(debug): add vscode debug launch setting (#9725)

L-Sunf7cbd21dd9d7
diff --git a/.vscode/launch.template.json b/.vscode/launch.template.json
index 689cdc8e3a..4232575d33 100644
--- a/.vscode/launch.template.json
+++ b/.vscode/launch.template.json
@@ -7,7 +7,11 @@
"request": "launch",
"runtimeExecutable": "yarn",
"cwd": "${workspaceFolder}",
- "runtimeArgs": ["affine", "@affine/server", "dev"]
+ "runtimeArgs": [
+ "affine",
+ "@affine/server",
+ "dev"
+ ]
},
{
"name": "Lanuch AFFiNE Web",
@@ -15,7 +19,20 @@
"request": "launch",
"runtimeExecutable": "yarn",
"cwd": "${workspaceFolder}",
- "runtimeArgs": ["affine", "@affine/web", "dev"]
+ "runtimeArgs": [
+ "affine",
+ "@affine/web",
+ "dev"
+ ]
+ },
+ {
+ "type": "chrome",
+ "request": "launch",
+ "name": "Debug AFFiNE Web",
+ "url": "http://localhost:8080",
+ "sourceMapPathOverrides": {
+ "webpack://affine/blocksuite/*": "${workspaceFolder}/blocksuite/*"
+ }
}
]
-}
+}
\ No newline at end of file
diff --git a/tools/cli/src/webpack/index.ts b/tools/cli/src/webpack/index.ts
index 2e88082813..ee8df27dce 100644
--- a/tools/cli/src/webpack/index.ts
+++ b/tools/cli/src/webpack/index.ts
@@ -113,9 +113,7 @@ export function createWebpackConfig(
mode: flags.mode,
devtool:
- flags.mode === 'production'
- ? 'source-map'
- : 'eval-cheap-module-source-map',
+ flags.mode === 'production' ? 'source-map' : 'cheap-module-source-map',
resolve: {
symlinks: true,