Fix incorrect module path when absoluteRuntime is specified (#11893)
* - Added failing tests for issue #11885. * - Fix issue #11885: absoluteRuntime does not work as expected with corejs3. * - Removed helper code from test output files (tests for issue #11885). * chore: add @babel/runtime-corejs3 to dev deps * chore: update test fixtures Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
This commit is contained in:
@@ -310,7 +310,7 @@ export default declare((api, options, dirname) => {
|
||||
node.callee = t.memberExpression(
|
||||
t.callExpression(
|
||||
this.addDefaultImport(
|
||||
`${moduleName}/${corejsRoot}/instance/${InstanceProperties[propertyName].path}`,
|
||||
`${modulePath}/${corejsRoot}/instance/${InstanceProperties[propertyName].path}`,
|
||||
`${propertyName}InstanceProperty`,
|
||||
),
|
||||
[context2],
|
||||
@@ -379,7 +379,7 @@ export default declare((api, options, dirname) => {
|
||||
path.replaceWith(
|
||||
t.callExpression(
|
||||
this.addDefaultImport(
|
||||
`${moduleName}/core-js/get-iterator-method`,
|
||||
`${modulePath}/core-js/get-iterator-method`,
|
||||
"getIteratorMethod",
|
||||
),
|
||||
[object],
|
||||
@@ -407,7 +407,7 @@ export default declare((api, options, dirname) => {
|
||||
path.replaceWith(
|
||||
t.callExpression(
|
||||
this.addDefaultImport(
|
||||
`${moduleName}/${corejsRoot}/instance/${InstanceProperties[propertyName].path}`,
|
||||
`${modulePath}/${corejsRoot}/instance/${InstanceProperties[propertyName].path}`,
|
||||
`${propertyName}InstanceProperty`,
|
||||
),
|
||||
[object],
|
||||
|
||||
Reference in New Issue
Block a user