compiled
compiled copied to clipboard
Source map support for atomic declarations
When we move to atomic declarations what can we do for source map support?
The main premise we need is - ensure developers have a way to back track to their code. We can't roll back to all in one declarations because that will break behaviour. We need another method.
One idea I have - when building in DEV (NODE_ENV !== 'production') we add an extra property declaration that we can map back, as well as maybe put some fun metadata in it.
.componentName--sourcemap {
name: componentName;
line: 20;
filename: filename.tsx,
}
And then the source map would only apply to this declaration.
Make sure to action these tickets when picking this up:
- https://github.com/atlassian-labs/compiled/issues/161
- https://github.com/atlassian-labs/compiled/issues/160