Closed WOSHIZHAZHA120 closed 1 year ago
Just to confirm, is this only an issue with HMR/dev mode?
Yes, the picture below is the result of building with single quotes src attribute
The figure below is the dev mode, the src attribute has not changed
If the src attribute is changed to double quotes, src will be replaced
The problem might be here, I see you replaced "/ but didn't take into account the case of '/ https://github.com/samrum/vite-plugin-web-extension/blob/main/src/devBuilder/devBuilder.ts#L141
Right, yeah, should be simple to fix, thanks.
Also, just noting that I'm in the process of rewriting the way that HTML parsing logic works since it's not fully equivalent with the way Vite normally parses HTML
I try fixed it in #113, waiting for your review
I have a project where the prettier plugin will replace all double quotes with single quotes
The following code is working
The following is the formatted code, and the script replacement will be invalid at this time