Skip to content

Commit

Permalink
feat: move bundles to dist, add note to readme regarding using entryp…
Browse files Browse the repository at this point in the history
…oints with typescript
  • Loading branch information
isaac-mason committed Dec 3, 2023
1 parent dd138fb commit 018733c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/tame-comics-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"arancini": minor
---

feat: move bundles to dist, add note to readme regarding using entrypoints with typescript
2 changes: 2 additions & 0 deletions packages/arancini/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ class ExampleSystem extends System {

You can install all of arancini with the umbrella `arancini` package, or you can install particular packages.

Note that in order to use entrypoints with typescript, you must use a `moduleResolution` option that supports entrypoints, for example `bundler` or `NodeNext`.

> **Note:** arancini ships as ECMAScript modules.
### [**`arancini`**](https://github.com/isaac-mason/arancini/tree/main/packages/arancini)
Expand Down
17 changes: 8 additions & 9 deletions packages/arancini/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"scripts": {
"build": "yarn build:before && rollup --config rollup.config.js --bundleConfigAsCjs",
"build:before": "(rm index.js index.d.ts react.js react.d.ts || true)",
"build:before": "rm -rf dist",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
},
Expand Down Expand Up @@ -58,21 +58,20 @@
"vite-plugin-dts": "^3.6.3"
},
"type": "module",
"main": "./index.js",
"types": "./index.d.ts",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": "./index.js"
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"./react": {
"import": "./react.js"
"types": "./dist/react.d.ts",
"import": "./dist/react.js"
}
},
"files": [
"index.js",
"index.d.ts",
"react.js",
"react.d.ts",
"dist",
"LICENSE",
"README.md"
]
Expand Down
4 changes: 2 additions & 2 deletions packages/arancini/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default [
external: ['@arancini/core'],
output: [
{
file: `./index.js`,
file: `./dist/index.js`,
...commonOutput,
},
],
Expand All @@ -38,7 +38,7 @@ export default [
external: ['@arancini/core', '@arancini/react', 'react', 'react-dom'],
output: [
{
file: `./react.js`,
file: `./dist/react.js`,
...commonOutput,
},
],
Expand Down
2 changes: 1 addition & 1 deletion packages/arancini/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
},
"include": ["./src"],
"files": ["./src/index.ts", "./src/react.ts"],
"exclude": ["./index.d.ts", "./react.d.ts"]
"exclude": ["./dist"]
}

1 comment on commit 018733c

@vercel
Copy link

@vercel vercel bot commented on 018733c Dec 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.