compileFile method

Uint8List compileFile(
  1. String key, {
  2. CompilerConfig? config,
  3. Version? version,
})

Compile a source within current sourceContext. This won't execute the code, so runtime errors will not be reported. If config is provided, it replaces the initialization compiler config for this compilation only.

Implementation

Uint8List compileFile(
  String key, {
  CompilerConfig? config,
  Version? version,
}) {
  final source = sourceContext.getResource(key);
  return _compileSource(
    source,
    version: version,
    config: config,
  );
}