You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently source maps don't really work in broccoli-sass.
There's two parts to this problem:
Read: the ability to see the source SASS in dev tools
Write: the ability to update the SASS in the dev tools, save your changes to the filesystem and have these changes written to the original source files
The current status is:
You can use broccoli-sass to generate source maps (node-sass provides source maps)
Unfortunately the mapping in the source map only map back to the source files as node-sass sees them, which may not be the original source files (ie. if you've used broccoli-merge-trees or any other compilation steps)
You can use the dev tools to create a mapping to the original source files, but the next time you start broccoli the directory path in tmp/ will have changed and the mapping no longer works.
There are a few potential solutions that have been investigated:
Embed the sources in the source map using sourcesContent. This is supported in libsass now, but hasn't been exposed in node-sass. This solves the read problem, but not write. See this issue for status.
Include the sources in the output tree, for example in output.css.sources/, and mutate the sources property in the source map so that they refer to this directory. This also solves the read problem, but not write. This is not necessary if option 1 works well.
Create our own source map that provides the mapping from the sources files to the files that are provided to libsass and pass this to libsass, which would then append its own transformations to this file. This should allow the dev tools to map all the way back to the source files, which would solve the write problem. The developer would still need to use the workspaces feature to authorise the dev tools to write to the file system. See this issue for status on this.
The text was updated successfully, but these errors were encountered:
Currently source maps don't really work in broccoli-sass.
There's two parts to this problem:
The current status is:
tmp/
will have changed and the mapping no longer works.There are a few potential solutions that have been investigated:
sourcesContent
. This is supported in libsass now, but hasn't been exposed in node-sass. This solves the read problem, but not write. See this issue for status.Include the sources in the output tree, for example inoutput.css.sources/
, and mutate thesources
property in the source map so that they refer to this directory. This also solves the read problem, but not write. This is not necessary if option 1 works well.The text was updated successfully, but these errors were encountered: