New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when using await import() #3072
Comments
if write import { join as pathJoin } from 'path';
export default async function createConfig() {
const pkgPath = pathJoin(__dirname, 'package.json');
const rootPkg = await import(pkgPath);
console.log(rootPkg);
} it works |
Thanks, this is definitely a bug. Pasting this into the REPL, we see that inside the dynamic import, |
Fix at #3073 |
How Do We Reproduce?
Expected Behavior
console.log displays package.json
Actual Behavior
ReferenceError: pathJoin is not defined
The text was updated successfully, but these errors were encountered: