Skip to content

Commit

Permalink
fix(react): do not add 'use client' directive on factory
Browse files Browse the repository at this point in the history
  • Loading branch information
cschroeter committed Aug 13, 2023
1 parent 01d3513 commit 5d798f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ description: All notable changes to this project will be documented in this file

## [Unreleased]

### Changed

- Removed `'use client'` annotation from `factory` function.

## [0.13.0] - 2023-08-13

### Changed
Expand Down Expand Up @@ -210,5 +214,4 @@ description: All notable changes to this project will be documented in this file
```

[0.12.0]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/[email protected]

[0.13.0]: https://github.com/chakra-ui/ark/releases/tag/@ark-ui/[email protected]
4 changes: 2 additions & 2 deletions packages/react/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ export default defineConfig({
preserveModulesRoot: 'src',
exports: 'named',
entryFileNames: '[name].cjs',
banner: (x) => (x.fileName.endsWith('index.cjs') ? '' : `'use client';`),
banner: (x) => (['index.cjs', 'factory.cjs'].includes(x.fileName) ? '' : `'use client';`),
},
{
format: 'es',
preserveModules: true,
preserveModulesRoot: 'src',
exports: 'named',
entryFileNames: '[name].mjs',
banner: (x) => (x.fileName.endsWith('index.mjs') ? '' : `'use client';`),
banner: (x) => (['index.mjs', 'factory.mjs'].includes(x.fileName) ? '' : `'use client';`),
},
],
},
Expand Down

2 comments on commit 5d798f8

@vercel
Copy link

@vercel vercel bot commented on 5d798f8 Aug 13, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

ark-redesign – ./web

ark-redesign-chakra-ui.vercel.app
ark-web-omega.vercel.app
ark-redesign-git-main-chakra-ui.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 5d798f8 Aug 13, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

ark-website – ./website

ark-website-git-main-chakra-ui.vercel.app
ark-website-chakra-ui.vercel.app
ark-ui.com
ark-website-three.vercel.app

Please sign in to comment.