atlassian-labs / compiled

A familiar and performant compile time CSS-in-JS library for React.
https://compiledcssinjs.com
Apache License 2.0
1.99k stars 67 forks source link

See whether Parcel stylesheet extraction works with XCSS #1712

Closed dddlr closed 2 weeks ago

dddlr commented 1 month ago

Spike whether https://github.com/atlassian-labs/compiled/issues/1306 is actually an issue or not...

From what I can tell, the following situation doesn't have good dev ex when stylesheet extraction is turned on and Parcel is used:

// otherFile.tsx

import { css } from '@compiled/react';

export const someStyles = css({ color: 'yellow' });
// index.tsx

import { someStyles } from './otherFile';
import { css } from '@compiled/react';

const App = () => (
  <>
    <div css={someStyles}>Some styles</div>
  </>
);

Updating the styles someStyles doesn't result in the new styles being applied to App unless you restart the whole app.

But the UI Styling Standard forbids exporting css, so I thought I'd check another situation where styles are exported: XCSS prop / createStrictAPI. Looks like there's no dev ex issues with that.

changeset-bot[bot] commented 1 month ago

⚠️ No Changeset found

Latest commit: 0a72c3632a1dd524a3193742fadbfcbdb2c7a194

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

netlify[bot] commented 1 month ago

Deploy Preview for compiled-css-in-js canceled.

Name Link
Latest commit 0a72c3632a1dd524a3193742fadbfcbdb2c7a194
Latest deploy log https://app.netlify.com/sites/compiled-css-in-js/deploys/66f6518ca390ba00081226a9