You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
630 B
28 lines
630 B
/*
|
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
Author Tobias Koppers @sokra
|
|
*/
|
|
"use strict";
|
|
const NullDependency = require("./NullDependency");
|
|
const webpackMissingModule = require("./WebpackMissingModule").module;
|
|
|
|
class UnsupportedDependency extends NullDependency {
|
|
constructor(request, range) {
|
|
super();
|
|
this.request = request;
|
|
this.range = range;
|
|
}
|
|
}
|
|
|
|
UnsupportedDependency.Template = class UnsupportedDependencyTemplate {
|
|
apply(dep, source, runtime) {
|
|
source.replace(
|
|
dep.range[0],
|
|
dep.range[1],
|
|
webpackMissingModule(dep.request)
|
|
);
|
|
}
|
|
};
|
|
|
|
module.exports = UnsupportedDependency;
|