-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Commonjs resolver plugin error since Waku 0.20.1 #677
Comments
Thanks for reporting! Oh, this is interesting and unexpected. I thought |
I would expect the same, but apparently not. This is part of the Would it be an option to revert back to the following, or do you have any arguments against it?
|
I'm fine to revert, but we need to understand the exact problem and the reason why |
we could experiment with swc cli. |
Totally agree! I have done a quick test by compiling ➜ waku-test npx swc ./node_modules/postgres/src/large.js
× Expected a semicolon
╭─[node_modules/postgres/src/large.js:4:1]
4 │ return new Promise(async(resolve, reject) => {
5 │ await sql.begin(async sql => {
6 │ let finish
7 │ !oid && ([{ oid }] = await sql`select lo_creat(-1) as oid`)
· ───
8 │ const [{ fd }] = await sql`select lo_open(${ oid }, ${ mode }) as fd`
9 │
10 │ const lo = {
╰────
Caused by:
Syntax Error
Error: Failed to compile 1 file with swc.
at Object.assertCompilationResult (/Users/daan/Downloads/waku-test/node_modules/@swc/cli/lib/swc/util.js:164:15)
at files (/Users/daan/Downloads/waku-test/node_modules/@swc/cli/lib/swc/file.js:205:19)
at async _default (/Users/daan/Downloads/waku-test/node_modules/@swc/cli/lib/swc/file.js:224:9) |
Thanks for trying! Can you try with |
I extracted the
This seems to work fine, no errors reported. When I run So to me it seems like an issue with |
I've also gone over the SWC docs on using |
Thanks for your investigation. Let's assume that it's a bug in SWC. |
When building my project with Waku 0.20.1 I get the following error, which I didn't get in Waku 0.20.0. This specifically occurs because of this single line change. When reverting this line to the original implementation, everything builds fine again.
I am not entirely sure why this change was necessary, but I assume there's some good reasoning behind it. Do you have some information on this? I'd love to help figure out a solution.
The text was updated successfully, but these errors were encountered: