environment property

CustomEnvironment environment
latefinal

FileSystemLoader.autoReload is not required because we handle reloading templates ourselves inside ServeCommand. Only this way we can ensure the template is updated before triggering rebuild.

Implementation

late final environment = CustomEnvironment(
  loader: FileSystemLoader(
    path: build.templatesDir,
  ),
);