mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 20:31:48 +00:00
This enables esbuild as the build tool of choice for the JetBrains extension. In addition to the changes that we also did for VSCode, this also removes support for the webpack build completely so that there's no other option than using esbuild anymore. There's one catch to this though: esbuild does not run the TypeScript compiler so builds no longer check if types are sound. This leaves us with two issues: We need a way to locally run a script to check if our project is sound outside of IDE integrations We need CI to ensure that types are sound. To do this, I added a new script yarn typecheck into the JetBrains folder. However this script only works if you run a full typescript build of the whole Sourcegraph folder to include dependencies, so it will take a bit longer the first time it runs. All of the files it generates seem to be part of gitignore rules already so this is not breaking your local changes. The good thing is that we do not need to care about 2) because yarn build-ts in the root is already run on CI and will detect type issues for all of the TypeScript packages in our repo which JetBrains is a part of.
6 lines
217 B
JavaScript
6 lines
217 B
JavaScript
// This file is used for esbuild's `inject` option
|
|
// in order to load node polyfills in the webworker
|
|
// extension host.
|
|
// See: https://esbuild.github.io/api/#inject.
|
|
export const Buffer = require('buffer/').Buffer
|