diff --git a/.changeset/tiny-melons-march.md b/.changeset/tiny-melons-march.md new file mode 100644 index 00000000000..7d30dcf7c18 --- /dev/null +++ b/.changeset/tiny-melons-march.md @@ -0,0 +1,5 @@ +--- +'@primer/react': minor +--- + +Add @primer/react/experimental entrypoint as an alternative to drafts diff --git a/experimental/package.json b/experimental/package.json new file mode 100644 index 00000000000..36794a4a78c --- /dev/null +++ b/experimental/package.json @@ -0,0 +1,8 @@ +{ + "_comment1": "this is required only for typescript. once this is fixed https://github.com/microsoft/TypeScript/issues/33079 we can remove this hack", + "name": "@primer/react/experimental", + "types": "../lib-esm/experimental/index.d.ts", + "main": "../lib-esm/experimental/index.js", + "type": "module", + "sideEffects": false +} diff --git a/package.json b/package.json index 7b0f72b73d7..ca621306828 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,10 @@ "import": "./lib-esm/index.js", "require": "./lib/index.js" }, + "./experimental": { + "import": "./lib-esm/experimental/index.js", + "require": "./lib/experimental/index.js" + }, "./drafts": { "import": "./lib-esm/drafts/index.js", "require": "./lib/drafts/index.js" diff --git a/rollup.config.js b/rollup.config.js index 99d1ea49e35..cbb17d02099 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -13,6 +13,9 @@ const input = new Set([ // "." 'src/index.ts', + // "./experimental" + 'src/experimental/index.ts', + // "./drafts" 'src/drafts/index.ts', diff --git a/src/experimental/index.ts b/src/experimental/index.ts new file mode 100644 index 00000000000..477d784c80a --- /dev/null +++ b/src/experimental/index.ts @@ -0,0 +1 @@ +export * from '../drafts'