-
-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Description
When compiling oxc_resolver
for wasm after 11.5.1
, I get the following error:
Compiling oxc_resolver v11.8.2
error[E0599]: no method named `to_file_path` found for struct `Url` in the current scope
--> /Users/ives/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/oxc_resolver-11.8.2/src/lib.rs:375:18
|
373 | let path = Url::parse(specifier)
| ________________________-
374 | | .map_err(|_| unsupported_error.clone())?
375 | | .to_file_path()
| | -^^^^^^^^^^^^ method not found in `Url`
| |_________________|
I think that's because in this commit (195e2f9) Url::parse(...).to_file_path()
was added, and that is not supported in wasm. I wonder if it would be sufficient to add a pragma to this block:
https://github.com/oxc-project/oxc-resolver/blob/main/src/lib.rs#L370-L381
That ensures we don't compile that block for wasm targets?
For additional context, I am using oxc_linter
in the browser, which has a dependency on oxc_resolver
, I think that is why I'm seeing the issue
Metadata
Metadata
Assignees
Labels
No labels