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
To make the re-transform happen when the json file is changed, the user that calls lightningcss.bundle needs to know which css file depends on which json file.
Simply having a convention (e.g. expose dependencies property from the visitor) would work if composeVisitors supports it, but having the information in TransformResult.dependency feels natural.
Plugins may rely on a different file but there's no way to tell that information to lightningcss.
For example, the plugin below depends on
.json
placed next to the input file.To make the re-transform happen when the json file is changed, the user that calls
lightningcss.bundle
needs to know which css file depends on which json file.Simply having a convention (e.g. expose
dependencies
property from the visitor) would work ifcomposeVisitors
supports it, but having the information inTransformResult.dependency
feels natural.For reference postcss, achieves this via messages.
https://github.com/postcss/postcss/blob/main/docs/guidelines/plugin.md#31-use-messages-to-specify-dependencies
Maybe it makes sense to have a way to emit warnings from visitors as well.
The text was updated successfully, but these errors were encountered: