-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Nested source maps #211
Comments
That's correct, they are currently not supported. This is not a simple change because the current source map infrastructure assumes that all source mappings from a given input file come from that file. I agree it would be a useful feature to be able to do this.
No, although changing what a path resolves to is a use case I have in mind for plugins. Plugins aren't supported yet but I will look into adding plugins in the future.
I'm attempting to use the same algorithm that other bundlers use, which is a combination of the node resolution algorithm, certain bundler-specific features such as the |
Using the tsconfig might actually be a long-term way, provided there is some kind of filtering method to allow exemptions of individual modules. Alternatively a neighbouring sourcemap file could be inspected and if it only points at one input file and that is a supported file type, the exact path is already present, so instead of using the .js file the source file can be used. The tsconfig is pretty straightforward of course as it more or less directly maps input folders to an output folder, thus finding the appropriate sub-path replacement operation is possible. The exception is, when typescript is used for bundling, which could be left out until nested source maps are supported. |
Hoooray !!! Will definitely run a new test with this feature as soon as I can |
When including a submodule which in turn exposes compiled javascript code (eg from typescript) the files exposed and included often have associated sourcemaps next to them. In that case it would be extremely helpful to include that mapping into the resulting output.
If nested sourcemaps are not supported is there a way to directly have the lookup resolve to the original src file instead of the compiled output ? Right now, the module resolution algorithm (which one are you using ?) is resolving via the package.json main,module,or export property which cannot include the ts file of course.
The text was updated successfully, but these errors were encountered: