Skip to content

Commit d0b257d

Browse files
Keen Yee Liauayazhafiz
authored andcommitted
fix: use non-rollup bundle in development (#408)
Rollup bundle does not work in development for a few reasons: 1. Watch mode in vscode has to wait for tsc then rollup to finish. This might be possible by setting up one task to "dependsOn" another task, but don't bother with this for now. See https://code.visualstudio.com/docs/editor/tasks#_compound-tasks 2. Sourcemaps have to be enabled in rollup, otherwise breakpoints in TS code would not work. Besides, running rollup is relatively slow, and thus hinders development velocity. Removing rollup from the development workflow has no impact on correctness, so it's safe to omit this step. Revisit this some other time if necessary.
1 parent 95b8f11 commit d0b257d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

client/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function activate(context: vscode.ExtensionContext) {
4949
},
5050
},
5151
debug: {
52-
module: context.asAbsolutePath(path.join('dist', 'server')),
52+
module: context.asAbsolutePath(path.join('server', 'out', 'server.js')),
5353
transport: lsp.TransportKind.ipc,
5454
args: [
5555
'--logFile',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"compile:test": "tsc -b server/src/tests",
3636
"compile:integration": "tsc -b integration",
3737
"format": "scripts/format.sh",
38-
"watch": "tsc -b -w & rollup -c -w",
38+
"watch": "tsc -b -w",
3939
"postinstall": "vscode-install && cd client && yarn && cd ../server && yarn && cd ..",
4040
"package": "rm -rf dist && node scripts/package.js",
4141
"test": "yarn compile:test && jasmine server/out/tests/*_spec.js",

0 commit comments

Comments
 (0)