diff --git a/lib/compiler/passes/generate-js.js b/lib/compiler/passes/generate-js.js index b7563ee..342d6a3 100644 --- a/lib/compiler/passes/generate-js.js +++ b/lib/compiler/passes/generate-js.js @@ -1,7 +1,6 @@ "use strict"; -let objects = require("../../utils/objects"), - asts = require("../asts"), +let asts = require("../asts"), op = require("../opcodes"), js = require("../js"); @@ -1279,8 +1278,8 @@ function generateJS(ast, options) { }, amd: function() { - let dependencyIds = objects.values(options.dependencies), - dependencyVars = Object.keys(options.dependencies), + let dependencyVars = Object.keys(options.dependencies), + dependencyIds = dependencyIds.map(v => options.dependencies[v]), dependencies = '[' + dependencyIds.map( id => '"' + js.stringEscape(id) + '"' @@ -1317,8 +1316,8 @@ function generateJS(ast, options) { umd: function() { let parts = [], - dependencyIds = objects.values(options.dependencies), dependencyVars = Object.keys(options.dependencies), + dependencyIds = dependencyIds.map(v => options.dependencies[v]), dependencies = '[' + dependencyIds.map( id => '"' + js.stringEscape(id) + '"'