diff --git a/.changeset/css-exports.md b/.changeset/css-exports.md deleted file mode 100644 index 4cbea343..00000000 --- a/.changeset/css-exports.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -'@crackle/core': minor ---- - -Crackle now supports importing external CSS. - -This is useful when consuming packages which come with their own CSS, such as [Pure React Carousel](https://github.com/express-labs/pure-react-carousel). - -External CSS can be imported with a side-effect `import`, same as how you would import a JavaScript or TypeScript module: - -```tsx -// src/components/MyComponent.tsx -import 'package-with-styles/dist/styles.css'; - -import { Component } from 'package-with-styles'; - -export const MyComponent = (props) => { - ; -}; -``` - -The side-effect import will be preserved in the output bundles. - -External CSS can also be imported with a CSS `@import` rule: - -```css -/* src/components/MyComponent/third-party.css */ -@import 'package-with-styles/dist/styles.css'; -``` - -```tsx -// src/components/MyComponent.tsx -import './third-party.css'; - -export const MyComponent = () => { - // ... -}; -``` - -When importing with a CSS `@import` rule, Crackle will bundle all external CSS into one file and output it to the `dist` directory. -Package exports will also be updated so consumers can import the bundled CSS. diff --git a/.changeset/deps.md b/.changeset/deps.md deleted file mode 100644 index 671b8616..00000000 --- a/.changeset/deps.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@crackle/core': minor ---- - -Update dependencies diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 105d45cf..f4f1eab3 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,12 @@ # @crackle/cli +## 0.12.4 + +### Patch Changes + +- Updated dependencies [[`433a30f`](https://github.com/seek-oss/crackle/commit/433a30f5ac81a107083b8d1c24ab9999f6f33ea4), [`f52495d`](https://github.com/seek-oss/crackle/commit/f52495dfaf603ba8f4dd87fc516b5ddb5ad07bd6)]: + - @crackle/core@0.28.0 + ## 0.12.3 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 38dddeb0..05bec60b 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@crackle/cli", - "version": "0.12.3", + "version": "0.12.4", "license": "MIT", "author": "SEEK", "exports": { @@ -33,7 +33,7 @@ "dev": "crackle dev" }, "dependencies": { - "@crackle/core": "^0.27.1", + "@crackle/core": "^0.28.0", "yargs": "^17.6.2" }, "devDependencies": { diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index c0df4660..24d2c48c 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,49 @@ # @crackle/core +## 0.28.0 + +### Minor Changes + +- [#128](https://github.com/seek-oss/crackle/pull/128) [`433a30f`](https://github.com/seek-oss/crackle/commit/433a30f5ac81a107083b8d1c24ab9999f6f33ea4) Thanks [@mrm007](https://github.com/mrm007)! - Crackle now supports importing external CSS. + + This is useful when consuming packages which come with their own CSS, such as [Pure React Carousel](https://github.com/express-labs/pure-react-carousel). + + External CSS can be imported with a side-effect `import`, same as how you would import a JavaScript or TypeScript module: + + ```tsx + // src/components/MyComponent.tsx + import 'package-with-styles/dist/styles.css'; + + import { Component } from 'package-with-styles'; + + export const MyComponent = (props) => { + ; + }; + ``` + + The side-effect import will be preserved in the output bundles. + + External CSS can also be imported with a CSS `@import` rule: + + ```css + /* src/components/MyComponent/third-party.css */ + @import 'package-with-styles/dist/styles.css'; + ``` + + ```tsx + // src/components/MyComponent.tsx + import './third-party.css'; + + export const MyComponent = () => { + // ... + }; + ``` + + When importing with a CSS `@import` rule, Crackle will bundle all external CSS into one file and output it to the `dist` directory. + Package exports will also be updated so consumers can import the bundled CSS. + +- [#127](https://github.com/seek-oss/crackle/pull/127) [`f52495d`](https://github.com/seek-oss/crackle/commit/f52495dfaf603ba8f4dd87fc516b5ddb5ad07bd6) Thanks [@mrm007](https://github.com/mrm007)! - Update dependencies + ## 0.27.1 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index a0f2a189..314a88d9 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@crackle/core", - "version": "0.27.1", + "version": "0.28.0", "license": "MIT", "author": "SEEK", "sideEffects": false, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4516d514..b2dd419d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -327,7 +327,7 @@ importers: packages/cli: dependencies: '@crackle/core': - specifier: ^0.27.1 + specifier: ^0.28.0 version: link:../core yargs: specifier: ^17.6.2