st_clair_clarke
st_clair_clarke

Reputation: 5715

Proper use of dart transformer

I have the following line in my pubspec.yaml file

transformers:
  - di
  - polymer:
    entry_points: web/index.html

di package is imported as a depency - no problem there. When I attempt an 'Upgrade Dependencies' the following error results

No dependencies changed.
Error on line 29, column 3 of pubspec.yaml: A transformer map must have a single key: the transformer identifier.
- polymer:
  ^^^^^^^^^

I have looked at other examples that seems similar to mine, including https://www.dartlang.org/tools/pub/assets-and-transformers.html#specifying-transformers but is unable to correct the error.

Thanks for helping.

Upvotes: 1

Views: 159

Answers (1)

Günter Zöchbauer
Günter Zöchbauer

Reputation: 657466

Remove the indentation before the transformers like

transformers:
- di
- polymer:
    entry_points: web/index.html

Upvotes: 2

Related Questions