WebdevServeTool
October 13, 2021 ยท View on GitHub
Runs a local web development server for the current project using the webdev
package.
Usage
// tool/dart_dev/config.dart
import 'package:dart_dev/dart_dev.dart';
final config = {
'serve': WebdevServeTool() // configure as necessary
};
Default behavior
By default this tool will run dart pub global run webdev serve which will build the
web/ directory using the Dart Dev Compiler and serve it on port 8080.
Configuration
Passing args to the webdev process
// tool/dart_dev/config.dart
import 'package:dart_dev/dart_dev.dart';
final config = {
'serve': WebdevServeTool()
..webdevArgs = ['--auto=refresh']
};
Passing args to the underlying build_runner process
// tool/dart_dev/config.dart
import 'package:dart_dev/dart_dev.dart';
final config = {
'serve': WebdevServeTool()
..buildArgs = ['--delete-conflicting-outputs']
};
Command-line options
$ ddev help serve