-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
webpack takes more than a minute, esbuild takes 2 seconds. esbuild has reasonable defaults wrt building css imports, webpack needs two additional plugins for that. esbuild has no file-watching support, but node has. since the build is now fast, we can just do a full rebuild when any file changes. there are other, newer, cooler runtimes (bun, rome, biome, idk), but esbuild has not changed in the past 2 years and is the one I know.
- Loading branch information
Showing
7 changed files
with
436 additions
and
664 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,6 @@ else | |
unset PS1 | ||
fi | ||
|
||
export PATH="$PWD/snuba/admin/node_modules/.bin/:$PATH" | ||
|
||
. scripts/rust-envvars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import * as esbuild from 'esbuild'; | ||
import { sentryEsbuildPlugin } from '@sentry/esbuild-plugin'; | ||
|
||
await esbuild.build({ | ||
entryPoints: ['./static/index.tsx'], | ||
bundle: true, | ||
outfile: 'dist/bundle.js', | ||
sourcemap: true, // Source map generation must be turned on | ||
plugins: [ | ||
// Put the Sentry esbuild plugin after all other plugins | ||
sentryEsbuildPlugin({ | ||
org: process.env.SENTRY_ORGANIZATION, | ||
project: process.env.SENTRY_PROJECT, | ||
|
||
// Auth tokens can be obtained from https://sentry.io/orgredirect/organizations/:orgslug/settings/auth-tokens/ | ||
authToken: process.env.SENTRY_AUTH_TOKEN, | ||
telemetry: false, | ||
}), | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,3 +96,5 @@ function getTab(locationHash: string): string { | |
|
||
return navItem.id; | ||
} | ||
|
||
export default {}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.