user2267395
user2267395

Reputation: 169

How to generate javascript with Dart editor

When I select Tools > Generate Javascript in Dart editor, I get an error message saying that I need to select a Dart library. I want to convert the entire project into javascript. I can't figure out how to do that.

Upvotes: 2

Views: 1046

Answers (2)

Eduardo Copat
Eduardo Copat

Reputation: 5151

In the menu,

Tools > Pub build

Then the generated javascript will be created in the /build/web folder.

Source

Upvotes: 2

Fox32
Fox32

Reputation: 13560

You need to select a dart file in a project that has a main function. Then you can use Tools > Generate Javascript to generate the Javascript. Dart automatically find all dependencies and compiles them to Javascript. If you have multiple projects that you want to compile, you need to do it for every project.

Upvotes: 1

Related Questions