Skip to content

Commit

Permalink
🧑‍💻add 'use client' to index for better nextjs support (#3703)
Browse files Browse the repository at this point in the history
* âž•rollup-preserve-directives

* 'use client' added to index.ts

* bump version for test release

* restore version
  • Loading branch information
oddvernes authored Dec 11, 2024
1 parent d902f48 commit cedfdf0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
1 change: 1 addition & 0 deletions packages/eds-core-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"rollup": "^4.22.5",
"rollup-plugin-delete": "^2.1.0",
"rollup-plugin-postcss": "^4.0.2",
"rollup-preserve-directives": "^1.1.3",
"storybook": "^8.3.4",
"styled-components": "6.1.12",
"tsc-watch": "^6.2.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/eds-core-react/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import resolve from '@rollup/plugin-node-resolve'
import postcss from 'rollup-plugin-postcss'
import commonjs from '@rollup/plugin-commonjs'
import { preserveDirective } from 'rollup-preserve-directives'
import { babel } from '@rollup/plugin-babel'
import del from 'rollup-plugin-delete'
import pkg from './package.json'
Expand All @@ -28,6 +29,7 @@ export default [
include: ['./src/**', './../tokens/**'],
},
plugins: [
preserveDirective(),
del({ targets: 'dist/*', runOnce: true }),
resolve({ extensions }),
commonjs(),
Expand Down
1 change: 1 addition & 0 deletions packages/eds-core-react/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client'
/* eslint-disable import/prefer-default-export */
export * from './components/Button'
export * from './components/Typography'
Expand Down
34 changes: 24 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cedfdf0

Please sign in to comment.