Skip to content

Commit

Permalink
feat(ui): export both cjs and mjs (#345)
Browse files Browse the repository at this point in the history
* feat(ui): export both cjs and mjs

* fix(ui): micro fixes to rollup scripts

* fix(ui): micro fixes to rollup scripts

* fix(ui): fix storybook build script

* chore(ui): add to prettierignore

---------

Co-authored-by: luzzifoss <[email protected]>
  • Loading branch information
luzzif and luzzifoss authored Aug 14, 2023
1 parent 0e9934b commit 8bca8f5
Show file tree
Hide file tree
Showing 13 changed files with 173 additions and 121 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilly-chicken-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@carrot-kpi/ui": minor
---

Export both mjs and cjs versions of the package
2 changes: 1 addition & 1 deletion packages/sdk/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default [
peerDepsExternal(),
nodeResolve({ preferBuiltins: true }),
commonjs(),
esbuild({ target: "es2022", tsconfig: "./tsconfig.build.json" }),
esbuild({ target: "es2020", tsconfig: "./tsconfig.build.json" }),
],
output: [
{
Expand Down
4 changes: 3 additions & 1 deletion packages/ui/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,6 @@ build
# Generated code about Fathom events
/packages/frontend/src/out

CHANGELOG.md
CHANGELOG.md

storybook-static
8 changes: 6 additions & 2 deletions packages/ui/.size-limit.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
[
{
"path": "./dist/**/*.js",
"limit": "660 KB"
"path": "./dist/es/**/*.mjs",
"limit": "700 KB"
},
{
"path": "./dist/cjs/**/*.cjs",
"limit": "700 KB"
},
{
"path": "./dist/styles.css",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = {
tailwindcss: {
config: path.resolve(
__dirname,
"../src/tailwind.config.js",
"../src/tailwind-config.js",
),
},
autoprefixer: {},
Expand Down
Loading

0 comments on commit 8bca8f5

Please sign in to comment.