Skip to content
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

Parcel Macro in the REPL #9557

Open
yfzhe opened this issue Feb 29, 2024 · 1 comment
Open

Parcel Macro in the REPL #9557

yfzhe opened this issue Feb 29, 2024 · 1 comment

Comments

@yfzhe
Copy link

yfzhe commented Feb 29, 2024

🐛 bug report

Parcel Macro and the REPL are both great features! However, it failed when I tried to write macros in the REPL.

For simplification, I use the code from the getRandomNumber example of macros: REPL link

🤔 Expected Behavior

console.log(/* a random number here */);

😯 Current Behavior

(function () {
function $fe2e15112bb76575$export$eab19c48dcb6310d() {
    return Math.random();
}


console.log((0, $fe2e15112bb76575$export$eab19c48dcb6310d)());

})();

🌍 Your Environment

// It says "Based on commit 2059029ee9" in the REPL.

@devongovett
Copy link
Member

Yeah I think it doesn't work in the wasm build yet. We'd need to do something like lightningcss using the asyncify transform to support async functions called from rust. https://github.com/parcel-bundler/lightningcss/blob/master/wasm/async.mjs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants