How do I minify JavaScript code compiled from Dart Editor?

前端 未结 2 2182

I am using Dart Editor to build a Dart app. I am compiling to JavaScript to run on all browsers. I want to minify the output JavaScript. How can I do this without dropping to th

2条回答
  •  佛祖请我去吃肉
    2021-02-07 09:07

    Starting with Dart Editor version 0.7.5_r27776, you can configure dart2js options in the "Launch Configuration" menu.

    On a Mac, open Launch Config options with Cmd-Shift-M. Or, select the drop-down arrow next to the green run button and select "Manage Launches":

    enter image description here

    Then, find your "run as javascript" config for your app. It will have a gray globe icon.

    Look for "compiler options" and add --minify

    enter image description here

提交回复
热议问题