File tree Expand file tree Collapse file tree 2 files changed +22
-10
lines changed Expand file tree Collapse file tree 2 files changed +22
-10
lines changed Original file line number Diff line number Diff line change 196196 "install-extension" : " code --install-extension oxc_language_server.vsix --force" ,
197197 "server:build:debug" : " cross-env CARGO_TARGET_DIR=./target cargo build -p oxc_language_server" ,
198198 "server:build:release" : " cross-env CARGO_TARGET_DIR=./target cargo build -p oxc_language_server --release" ,
199- "test" : " pnpm run compile && vscode-test" ,
199+ "test" : " cross-env TEST=true pnpm run compile && vscode-test" ,
200200 "type-check" : " tsc --noEmit"
201201 },
202202 "devDependencies" : {
Original file line number Diff line number Diff line change 1- import { defineConfig } from 'rolldown' ;
1+ import { defineConfig , type RolldownOptions } from 'rolldown' ;
2+ import { globSync } from 'tinyglobby' ;
3+
4+ const input : RolldownOptions [ 'input' ] = process . env . TEST === 'true'
5+ ? globSync ( 'tests/**/*.ts' )
6+ : [ 'client/extension.ts' ] ;
7+
8+ const output : RolldownOptions [ 'output' ] = {
9+ sourcemap : true ,
10+ format : 'cjs' ,
11+ banner : `"use strict";\n` ,
12+ minify : true ,
13+ } ;
14+
15+ if ( process . env . TEST === 'true' ) {
16+ output . dir = 'out' ;
17+ } else {
18+ output . file = 'out/main.js' ;
19+ }
220
321export default defineConfig ( {
4- input : 'client/extension.ts' ,
5- output : {
6- file : 'out/main.js' ,
7- sourcemap : true ,
8- format : 'cjs' ,
9- banner : `"use strict";\n` ,
10- minify : true ,
11- } ,
22+ input,
23+ output,
1224 external : [ 'vscode' ] ,
1325 platform : 'node' ,
1426 transform : {
You can’t perform that action at this time.
0 commit comments