sourcesync icon indicating copy to clipboard operation
sourcesync copied to clipboard

Make SourceSync Compatible with Vite.js

Open m5x5 opened this issue 1 year ago • 1 comments

From what I've seen Vite.js doesn't yet emit source maps in build mode. But we need a source file to correctly map the changes that Chrome does to the original file.

In addition to that we need the generated css file to be saved on the computer, otherwise Chrome won't be able to change the generated file.

m5x5 avatar Jul 29 '23 12:07 m5x5

In order to make this happen it's important to understand how the Chrome workspace feature works. This is my assumption:

  1. User configures a workspace in Chrome
  2. User visits website and Chrome looks at the URLs of the .css files
  3. If a CSS file for example is served from the route /styles/bundle.css it'll search for the same combination anywhere in the the folder you added as a workspace
  4. If a file was found in the workspace it'll be updated (maybe Chrome will check if the file content matches the file that was served)

m5x5 avatar Jul 31 '23 07:07 m5x5