compiled icon indicating copy to clipboard operation
compiled copied to clipboard

Deconstructed values from star import are not evaluated

Open pancaspe87 opened this issue 3 years ago • 0 comments

Try this out in /packages/babel-plugin/src/__tests__/module-traversal.test.tsx. it won't work

      import '@compiled/react';
      import React from 'react';
      import * as colors from '../__fixtures__/mixins/simple';

      const { secondary } = colors;

      <div css={{ color: secondary }} />

This one works

 import '@compiled/react';
      import React from 'react';
      import * as colors from '../__fixtures__/mixins/simple';

      <div css={{ color: colors.secondary }} />

Originally posted by @at-nathan in https://github.com/atlassian-labs/compiled/issues/1043#issuecomment-1014172215

pancaspe87 avatar Jan 19 '22 22:01 pancaspe87