Bence Szalai

Results 77 comments of Bence Szalai

I am facing the same issue. It is kind of annoying, which is not a valuable addition to the discussion, I know, but I'm saying this to offer any additional...

Looking into it looks like to me the issue is caused by simply the fact that the file seen by the browser and by the IDE are different. Probably there's...

So after some digging it looks like to me, that [`buildImportAnalysisPlugin`](https://github.com/vitejs/vite/blob/main/packages/vite/src/node/plugins/importAnalysisBuild.ts) does generates source map, while [`importAnalysisPlugin`](https://github.com/vitejs/vite/blob/main/packages/vite/src/node/plugins/importAnalysis.ts#L161) does not. So probably the way to fix it is to extend the...

I've got it working by implementing source maps inside [`importAnalysisPlugin`](https://github.com/vitejs/vite/blob/main/packages/vite/src/node/plugins/importAnalysis.ts#L161). I've been working on `v2.9.13`, so the changes are not directly applicable to the latest version of the code, but...

Afaics only adding the source without the proper mappings may only work as long as the number of lines are not changed and there are no changes at all to...

I can confirm it is working at least in my test case as shown above, with only setting the `source` in the map, without generating any `mappings`. By the same...

> If this works, I think we only need to inject sourcemap when a query is injected (example: ?t=) and sourcemap is not generated by anything. Sourcemap always have to...

Can someone please explain how this would work properly? If the files in the `dist` folder are generated only once, that means the hashes are generated once as well, so...

You are right, sorry, I was thinking about using [`nonce`](https://content-security-policy.com/nonce/), but said `hash` only because the recommended `nonce` value is a “cryptographically secure random token”, which to I referred in...

To implement this for SPA we need to assess all the scripts (and imo styles) that needs hashing. By looking at my test project I've noticed these inline elements added...