Skip to content

Commit f7c9072

Browse files
bmeurerDevtools-frontend LUCI CQ
authored andcommitted
[npm] Check for devtools_bundle=false in npm run build -- --watch.
Bug: 411328609 Change-Id: Iac4de94fd99c447428705e0d6d3d3c2c5790919d Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6687409 Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org> Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
1 parent 282eff6 commit f7c9072

2 files changed

Lines changed: 6 additions & 15 deletions

File tree

docs/get_the_code.md

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,19 @@ it'll automatically create and initialize it.
4646
You can disable type checking (via TypeScript) by using the `devtools_skip_typecheck`
4747
argument in your GN configuration. This uses [esbuild](https://esbuild.github.io/)
4848
instead of `tsc` to compile the TypeScript files and generally results in much
49-
shorter build times. To switch the `Default` target to esbuild, use
50-
51-
```bash
52-
gn gen out/Default --args="devtools_skip_typecheck=true"
53-
```
54-
55-
or if you don't want to change the default target, use something like
56-
57-
```bash
58-
gn gen out/fast-build --args="devtools_skip_typecheck=true"
59-
```
60-
61-
and use `npm run build -- -t fast-build` to build this target.
49+
shorter build times.
6250

6351
Additionally, we now bundle files together by default in all builds, which has
6452
a build time cost. If you want an even fast fast build, you might want to opt
65-
out of bundling by setting `devtools_bundle` to `false`:
53+
out of bundling by setting `devtools_bundle` to `false`
6654

6755
```bash
6856
gn gen out/fast-build --args="devtools_skip_typecheck=true devtools_bundle=false"
6957
```
7058

59+
and use `npm run build -- -t fast-build` to build this target (you can of course
60+
also just change the `Default` target to skip bundling and type checking).
61+
7162

7263
### Rebuilding automatically
7364

scripts/devtools_build.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ async function computeBuildTargetsForFiles(target, filenames) {
284284
filenames = filenames.map(filename => path.join('third_party', 'devtools-frontend', 'src', filename));
285285
}
286286
const gnArgs = await gnArgsForTarget(target);
287-
if (gnArgs.get('is_debug') === 'true') {
287+
if (gnArgs.get('devtools_bundle') === 'false') {
288288
try {
289289
const gnRefs = (await Promise.all(filenames.map(filename => gnRefsForTarget(target, filename)))).flat();
290290
if (gnRefs.length) {

0 commit comments

Comments
 (0)