github-actions
released this
04 Apr 12:33
·
43 commits
to main
since this release
Minor Changes
-
#1344
bf1bdb0
Thanks @SutuSebastian! - Rework build process usingrollup
andtsc
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 thantsc
, which is very slow.After evaluating various tools including
tsup
,tshy
, andbun build
, we choserollup
with theesbuild
plugin for transpiling due to its performance and flexibility. We continue to usetsc
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 fromdist/esm
todist/types
- all files in the
- changed the build output dir from
lib
todist
- created a facade layer for easier management of the
content
path as well as theplugin
- fixed turbo repo dependency tree configs in order for
apps/web
to properly pipe and require the build output ofpackages/ui
in certain script steps such asbuild
anddev
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
/** @type {import('tailwindcss').Config} */ module.exports = { content: [ // ... "node_modules/flowbite-react/lib/esm/**/*.js", ], plugins: [ // ... require("flowbite/plugin"), ], };
After
const flowbite = require("flowbite-react/tailwind"); /** @type {import('tailwindcss').Config} */ module.exports = { content: [ // ... flowbite.content(), ], plugins: [ // ... flowbite.plugin(), ], };
Addresses Issues
- added