-
Notifications
You must be signed in to change notification settings - Fork 15
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
Sourcemap generation #3
Comments
Found these resources useful:
|
Is there a way to avoid having vite log this warning? I personally don't care about source maps for YAML files but I do care about warnings in the build 😉. |
I don't think sourcemaps are useful for this plugin because it outputs JS objects, where there is no way to reference a line back to the source file because JS objects have no concept of a line. So I think this plugin should somehow indicate back to vite that it will not generate a sourcemap and hopefully that will make vite shut up. |
I think the sourcemap would be useful for mapping back through the conversion to which line in the original YAML file is incorrect, however the YAML processor essentially does that already with a well-formatted error displaying exactly which part of the file is causing an issue. Perhaps providing a null-ish source map would satisfy Vite's wants |
Of note is that the warning does not originate in vite itself, but in rollup. Edit: also see https://rollupjs.org/guide/en/#warning-sourcemap-is-likely-to-be-incorrect |
Provide an empty source map to Rollup to avoid it warning on missing sourcemap. Ref: https://rollupjs.org/guide/en/#source-code-transformations Related: Modyfi#3
#9 will suppress the warning until it is figured out how to actually generate a sourcemap. |
On build, the plugin yields this warning:
We should add sourcemap generation around the yaml file -> ESM conversion. A potentially useful resource to base this on could be: https://github.com/amireh/yaml-source-map
The text was updated successfully, but these errors were encountered: