UNPKG

685 BJavaScriptView Raw
1/**
2 * @fileoverview The webpack harmony plugin adds constant dependencies to clear
3 * out parts of both import and export statements. The dependency acts as a marker
4 * so that we can locate and remove those constant dependencies later.
5 */
6
7const NullDependency = require('webpack/lib/dependencies/NullDependency');
8const HarmonyNoopTemplate = require('./harmony-noop-template');
9
10class ClosureHarmonyMarkerDependency extends NullDependency {
11 constructor(range) {
12 super();
13 this.range = range;
14 }
15
16 updateHash(hash) {
17 hash.update(this.range + '');
18 }
19}
20
21ClosureHarmonyMarkerDependency.Template = HarmonyNoopTemplate;
22
23module.exports = ClosureHarmonyMarkerDependency;