webpack/lib/dependencies/WebAssemblyImportDependency.js

28 lines
519 B
JavaScript
Raw Normal View History

/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const ModuleDependency = require("./ModuleDependency");
class WebAssemblyImportDependency extends ModuleDependency {
constructor(request, name) {
super(request);
this.name = name;
}
getReference() {
2018-02-25 09:00:20 +08:00
if (!this.module) return null;
return {
module: this.module,
importedNames: [this.name]
};
}
get type() {
return "wasm import";
}
}
module.exports = WebAssemblyImportDependency;