Rely entirely on sourceType for module vs script differentiation. (#7417)
This commit is contained in:
@@ -98,9 +98,7 @@ export default function(api, options) {
|
||||
visitor: {
|
||||
Program: {
|
||||
exit(path) {
|
||||
// For now this requires unambiguous rather that just sourceType
|
||||
// because Babel currently parses all files as sourceType:module.
|
||||
if (!isModule(path, true /* requireUnambiguous */)) return;
|
||||
if (!isModule(path)) return;
|
||||
|
||||
// Rename the bindings auto-injected into the scope so there is no
|
||||
// risk of conflict between the bindings.
|
||||
|
||||
Reference in New Issue
Block a user