:foreign-libs with module conversion does not works properly if it is used form deps.cljs

Description

When :foreign-libs is used for consume commonjs (or amd) modules from clojurescript using the `deps.cljs` mechanism, an unexpected "internal compiler error" is raised. When the same configuration is attached on the build script, everything works as expected.

Simple way to reproduce that, create sample directory tree:

Download the latest compiler or copy the recently build one from master:

Create the sample cljs file:

Create the sample commonjs module:

Create the build script (that works):

And compile this using the following command:

This will generate successfully the final artifact that can be successufully executed with node:

But, if you remove the `:foreign-libs` from the build script and create a new `src/deps.cljs` file
with the following content:

And try compile it:

Environment

Linux, openjdk8

Assignee

Unassigned

Reporter

import

Approval

None

Patch

Code

Affects versions

Priority

Minor
Configure