vite-plugin-css-injected-by-js icon indicating copy to clipboard operation
vite-plugin-css-injected-by-js copied to clipboard

[Bug]: When used together with sentry, sourcemap upload does not work well.

Open siosio34 opened this issue 11 months ago • 2 comments

🐞 Bug Report

Describe the bug

When used together with sentry, sourcemap upload does not work well.

If you build Sentry following https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/vite/ without adding this plugin, the sourcemap will be uploaded and the sourcemap file will be mapped well when an error occurs. However, if you add this plugin, error mapping through the .map file will not work properly when an error occurs even if the source map is uploaded.

I think it may be ambiguous to post this here, but Sentry is a monitoring tool used in many products, and I think the library you created is the best for preventing rendering blocking by injecting CSS, so it would be great if these two were compatible together. It's the same.

siosio34 avatar Mar 11 '24 09:03 siosio34

Does the plugin operate after the build results and sourcemap are created in rollup, making it difficult to map the build results and sourcemap?

siosio34 avatar Mar 15 '24 01:03 siosio34

Sorry for the delay but I was busy. Exactly the plugin operates after the building process is done. It's based on generateBundle hook (https://github.com/marco-prontera/vite-plugin-css-injected-by-js/blob/5c6134310ed890a1862bde9f69a7e36ba7c95748/src/index.ts#L62)

I need some time to figure out how the problem you described can be solved, of course any help is appreciated

marco-prontera avatar Mar 19 '24 16:03 marco-prontera