-1

Is it possible to specify a single file to flutter package pub run build runner?

Loïc Fonkam
  • 2,284
  • 11
  • 25

1 Answers1

1

From the build_runner build --help output:

--build-filter                  An explicit filter of files to build.
                                    Relative paths and `package:` uris are
                                    supported, including glob syntax for paths
                                    portions (but not package names).

There is an example in their changelog:

Example: The following would build and serve the JS output for an application, as well as copy over the required SDK resources for that app:

pub run build_runner serve \
  --build-filter="web/main.dart.js" \
  --build-filter="package:build_web_compilers/**/*.js"

https://pub.dev/packages/build_runner/changelog#170

dkap
  • 212
  • 1
  • 6