Skip to content

Commit

Permalink
Version Packages (#1349)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Apr 4, 2024
1 parent bf1bdb0 commit a3d282b
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 64 deletions.
63 changes: 0 additions & 63 deletions .changeset/hungry-toys-care.md

This file was deleted.

64 changes: 64 additions & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,69 @@
# Changelog

## 0.8.0

### Minor Changes

- [#1344](https://github.com/themesberg/flowbite-react/pull/1344) [`bf1bdb0`](https://github.com/themesberg/flowbite-react/commit/bf1bdb0e1bf303d830990b3bf7c5d1a46af3648f) Thanks [@SutuSebastian](https://github.com/SutuSebastian)! - ## Rework build process using `rollup` and `tsc`

### Summary

In order to bring more performance to the build process of `flowbite-react` package, we have to consider transpiling the files using other tools rather than `tsc`, which is very slow.

After evaluating various tools including `tsup`, `tshy`, and `bun build`, we chose `rollup` with the `esbuild` plugin for transpiling due to its performance and flexibility. We continue to use `tsc` solely for generating `*.d.ts` declaration files.

### Changes

- added `rollup` + `esbuild` for transpiling files
- all files in the `cjs` directory now have `.cjs` extension
- all files in the `esm` directory now have `.mjs` extension
- declaration file types (`*.d.ts`) have been moved from `dist/esm` to `dist/types`
- changed the build output dir from `lib` to `dist`
- created a facade layer for easier management of the `content` path as well as the `plugin`
- fixed turbo repo dependency tree configs in order for `apps/web` to properly pipe and require the build output of `packages/ui` in certain script steps such as `build` and `dev`

### Breaking changes

`tailwind.config.js` `content` path:

old: `"node_modules/flowbite-react/lib/esm/**/*.js"`

new: `"node_modules/flowbite-react/dist/esm/**/*.mjs"` - (`flowbite.content()` returns it)

Before

```js {5,9}
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
// ...
"node_modules/flowbite-react/lib/esm/**/*.js",
],
plugins: [
// ...
require("flowbite/plugin"),
],
};
```

After

```js {1,7,11}
const flowbite = require("flowbite-react/tailwind");

/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
// ...
flowbite.content(),
],
plugins: [
// ...
flowbite.plugin(),
],
};
```

## 0.7.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flowbite-react",
"version": "0.7.8",
"version": "0.8.0",
"description": "Official React components built for Flowbite and Tailwind CSS",
"keywords": [
"design-system",
Expand Down

0 comments on commit a3d282b

Please sign in to comment.