Open MrToy opened 8 months ago
@Boshen does oxc_resolver supports passing custom filesystem now?
It seems oxc_resolver supports filesystem, but Rspack resolve options doesn't support pass filesystem to oxc_resolver yet
To support this use case, Rspack needs to implement ResolverGeneric
from oxc_resolver
with its own implementation of FileSystem
, and expose the relevant APIs to the JS side.
The last time I tried to work with inputFileSystem
, I realized that rspack only use .purge
method of it.
therefore I think rspack hasn't been ready for inputFileSystem
. pls correct me if i got the thing wrong.
The last time I tried to work with
inputFileSystem
, I realized that rspack only use.purge
method of it.therefore I think rspack hasn't been ready for
inputFileSystem
. pls correct me if i got the thing wrong.
since inputFileSystem is a public API, other Rspack|Webpck plugin may use other method in it.
The last time I tried to work with
inputFileSystem
, I realized that rspack only use.purge
method of it. therefore I think rspack hasn't been ready forinputFileSystem
. pls correct me if i got the thing wrong.since inputFileSystem is a public API, other Rspack|Webpck plugin may use other method in it.
i mean that rspack doesn't utilize inputFileSystem
for reading file system.
Previously, i used to create memfs as inputFileSystem
and outputFileSystem
for unit testing purposes. This allowed me to avoid generating numerous fixture files in my repository or pay effort at cleaning up test artifacts after testing
However, when I attempted to do the same with rspack, I noticed that the outputFileSystem
worked as expected while the inputFileSystem
didn't
because Rspack read outputFilesystem and not read inputFilesystem in Rust side yet, see https://github.com/web-infra-dev/rspack/blob/main/crates/node_binding/src/lib.rs#L68
because Rspack read outputFilesystem and not read inputFilesystem in Rust side yet, see https://github.com/web-infra-dev/rspack/blob/main/crates/node_binding/src/lib.rs#L68
i see - i believe this issue is also this thing.
@xc2 do you want to give it a try to implement this feature?
@xc2 do you want to give it a try to implement this feature?
hard to promise as i'm quite new to rust. previous i had a hard time to impl module.noParse
, still being blocked by a runtime panic to do with the js function call in rust.
i will still give it a try but it is supposed to be long.
It's not an urgent feature, so take your time, and if you met problems when contributing to Rspack, feel free to ping us
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!
bump
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!
bump
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!
bump
System Info
System: OS: macOS 14.0 CPU: (12) arm64 Apple M2 Max Memory: 387.53 MB / 64.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 19.9.0 - ~/.nvm/versions/node/v19.9.0/bin/node npm: 9.6.3 - ~/.nvm/versions/node/v19.9.0/bin/npm pnpm: 7.15.0 - ~/.nvm/versions/node/v19.9.0/bin/pnpm Browsers: Chrome: 120.0.6099.109 Safari: 17.0 npmPackages: @rspack/core: ^0.4.4 => 0.4.4
Details
I'm trying to bundle my project using a virtual file system.
Here is my code.
Here is error message
Reproduce link
No response
Reproduce Steps
It can be reproduced by running the code I provided.