style-dictionary icon indicating copy to clipboard operation
style-dictionary copied to clipboard

🪲 "exportPlatform" doesn't apply filters

Open tgelu opened this issue 1 year ago • 0 comments

I have a config for a platform which looks like this:

            platforms: {
              css: {
                transforms: CSS_TRANSFORMS,
                files: [
                  {
                    filter: (token) => token.isSource,
                    format: 'css/variables',
                    options: {
                      outputReferences: true,
                    },
                  },
                ],
              },
            },

If I try to use the dictionary using this config and call .exportPlatform('css') I get everything as expected except that the filter doesn't seem to take effect. This is not true if I call buildPlatform('css') which writes to file.

tgelu avatar Jul 21 '23 07:07 tgelu