transpiling amd-js module

17 views
Skip to first unread message

Alok Priyadarshi

unread,
Sep 16, 2016, 8:30:12 PM9/16/16
to Chromium-dev
Hi Chromium-dev,

Is there a tool in chromium to compile js files containing amd modules? I specifically want to compile mojo public js in //mojo/public/js.

I tried using the closure_compiler in third_party with --transform_amd_modules option, but I get this error:
../../mojo/public/js/buffer.js:5: ERROR - Only define(function() ...), define(OBJECT_LITERAL) and define([dep, dep1], function(d0, d2, [exports, module]) ...) forms are currently supported.

IIUC closure does not yet support specifying id for a module? Is there another tool to accomplish this?

FWIW here is the experimental patch: https://codereview.chromium.org/2347783004/

Alok Priyadarshi

unread,
Sep 22, 2016, 1:16:46 PM9/22/16
to Chromium-dev, db...@chromium.org, abe...@chromium.org, Tyler Breisacher
CC'ing a few folks who might know.
Reply all
Reply to author
Forward
0 new messages