Replies: 8 comments
Compiler-wiseToggle made to the whole compiler, turning in on means this will apply to every module during each compilation. Pro:
Con:
Module rule wiseSupport toggling in module rule wise, this can only opt-in only a certain pieces of modules in the remapping, for example: user code. Pro:
Con:
|
|
I think this should be a opt-in feature(other than opt-out) considering we have no way to guarantee the source-map correctness and it's the same behavior like --enable-source-maps. |
I agree with you, and I would suggestion this feature should be opt-in compiler-wise or module rule wise. But feel free to propose with a better solution if you have any ;-). Edit: Plugin looks good to me too, but it does not solve the problem of placing it on compiler-wise or module rule wise.
In this case, if there's no either |
It seems you can control this in plugin options? since you got whole sourcemap and error location info in stats, so you can do reverse mapping for any module? |
Sure we have the capability to handle this, the design part should be deliberately considered for the best user experience. |
|
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! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
What problem does this feature solve?
In the current implementation of rspack, module build error and module parse error would be mapped based on the output of loader, which leads its corresponding error span not being able to mark the user input.
What does the proposed API of configuration look like?
This will work better, in the best case scenario, if
options.devtoolset tomodulerelated options (for example:cheap-module-source-map) and will be remapped along with errors lazily for better performance.This does not expose any JS APIs, however it could be enabled with
experimentsoptions, the exact option name remains to be determined. This is built-on the contract that source-map must be correct, otherwise the remapped source or span message might be incorrect. So this feature should be opt-in in compiler-wise or module rule wise.All reactions