Remove hub.file usage from babel-core
This commit is contained in:
parent
0fd3da110d
commit
59e9c6322b
@ -10,11 +10,11 @@ export default class ImportBuilder {
|
|||||||
_resultName = null;
|
_resultName = null;
|
||||||
|
|
||||||
_scope = null;
|
_scope = null;
|
||||||
_file = null;
|
_hub = null;
|
||||||
|
|
||||||
constructor(importedSource, scope, file) {
|
constructor(importedSource, scope, hub) {
|
||||||
this._scope = scope;
|
this._scope = scope;
|
||||||
this._file = file;
|
this._hub = hub;
|
||||||
this._importedSource = importedSource;
|
this._importedSource = importedSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,10 +91,10 @@ export default class ImportBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultInterop() {
|
defaultInterop() {
|
||||||
return this._interop(this._file.addHelper("interopRequireDefault"));
|
return this._interop(this._hub.addHelper("interopRequireDefault"));
|
||||||
}
|
}
|
||||||
wildcardInterop() {
|
wildcardInterop() {
|
||||||
return this._interop(this._file.addHelper("interopRequireWildcard"));
|
return this._interop(this._hub.addHelper("interopRequireWildcard"));
|
||||||
}
|
}
|
||||||
|
|
||||||
_interop(callee) {
|
_interop(callee) {
|
||||||
|
|||||||
@ -108,7 +108,7 @@ export default class ImportInjector {
|
|||||||
/**
|
/**
|
||||||
* The file used to inject helpers and resolve paths.
|
* The file used to inject helpers and resolve paths.
|
||||||
*/
|
*/
|
||||||
_file;
|
_hub;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default options to use with this instance when imports are added.
|
* The default options to use with this instance when imports are added.
|
||||||
@ -127,7 +127,7 @@ export default class ImportInjector {
|
|||||||
|
|
||||||
this._programPath = programPath;
|
this._programPath = programPath;
|
||||||
this._programScope = programPath.scope;
|
this._programScope = programPath.scope;
|
||||||
this._file = programPath.hub.file;
|
this._hub = programPath.hub;
|
||||||
|
|
||||||
this._defaultOpts = this._applyDefaults(importedSource, opts, true);
|
this._defaultOpts = this._applyDefaults(importedSource, opts, true);
|
||||||
}
|
}
|
||||||
@ -218,7 +218,7 @@ export default class ImportInjector {
|
|||||||
const builder = new ImportBuilder(
|
const builder = new ImportBuilder(
|
||||||
importedSource,
|
importedSource,
|
||||||
this._programScope,
|
this._programScope,
|
||||||
this._file,
|
this._hub,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (importedType === "es6") {
|
if (importedType === "es6") {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user