Skip to content

Commit d59618a

Browse files
authored
Update faq.md (#1719)
1 parent 1ee129d commit d59618a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/faq.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,27 @@ targets:
3838
compiler: dart2js
3939
```
4040
41+
## How can I include additional sources in my build?
42+
43+
By default, the `build_runner` package only includes some specifically
44+
whitelisted directories, derived from the [package layout conventions](
45+
https://www.dartlang.org/tools/pub/package-layout).
46+
47+
If you have some additional files which you would like to be included as part of
48+
the build, you will need a custom `build.yaml` file. You will want to modify the
49+
`sources` field on the `$default` target:
50+
51+
```yaml
52+
targets:
53+
$default:
54+
sources:
55+
- my_custom_sources/**
56+
- lib/**
57+
- web/**
58+
# Note that it is important to include these in the default target.
59+
- pubspec.*
60+
```
61+
4162
## Why do Builders need unique outputs?
4263

4364
`build_runner` relies on determining a static build graph before starting a

0 commit comments

Comments
 (0)