diff --git a/.vscode/tasks.json b/.vscode/tasks.json index aa6c648e..36cf472e 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,7 +4,7 @@ { "type": "shell", "command": "npm", - "args": ["run", "build", "--", "--sourcemap"], + "args": ["run", "build:debug"], "label": "build", "presentation": { "clear": true, diff --git a/fixtures/demo/tsconfig.json b/fixtures/demo/tsconfig.json index d6d62cc4..6dfc0ed8 100644 --- a/fixtures/demo/tsconfig.json +++ b/fixtures/demo/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "checkJs": true, "jsx": "react-jsx", - "lib": ["es2020"], + "lib": ["dom", "es2020"], "module": "node16", "strict": true } diff --git a/package.json b/package.json index 8704b5fa..0cccae17 100644 --- a/package.json +++ b/package.json @@ -29,16 +29,19 @@ ], "scripts": { "build": "esbuild @mdx-js/language-client @mdx-js/language-server --bundle --platform=node --target=node16 --external:vscode --outdir=out", + "build:debug": "npm run copy-libs && npm run build -- --sourcemap", + "copy-libs": "cpy 'node_modules/typescript/lib/lib.*.d.ts' out/", "format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix", "start": "npm --workspace @mdx-js/monaco-demo run start", "test-api": "npm run test-api --workspaces --if-present", "test": "npm run build && npm --workspaces run build && npm run format && npm run test-api", - "vscode:prepublish": "npm run build -- --minify" + "vscode:prepublish": "npm run copy-libs && npm run build -- --minify" }, "devDependencies": { "@changesets/changelog-github": "^0.4.0", "@changesets/cli": "^2.0.0", "@types/react": "^18.0.0", + "cpy-cli": "^4.0.0", "esbuild": "^0.16.0", "ovsx": "^0.7.0", "prettier": "^2.0.0",