Skip to content

Commit

Permalink
fixes #1344 - importing the react file from ./dist should not be ma…
Browse files Browse the repository at this point in the history
…pped to `./src`.

- For `nextjs` to compile React components from `node_modules` the 3rd-party component should add `'use client';` at the top of the `jsx` file
  • Loading branch information
yairEO committed May 13, 2024
1 parent d58d6bb commit 0ae33a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
},
"./react": "./src/react.tagify",
"./react.tagify": "./src/react.tagify",
"./dist/react.tagify": "./src/react.tagify",
"./dist/react.tagify.jsx": "./src/react.tagify.jsx",
"./dist/react.tagify": "./dist/react.tagify.jsx",
"./dist/react.tagify.jsx": "./dist/react.tagify.jsx",
"./dist/tagify.min.js": "./dist/tagify.js",
"./dist/tagify.min": "./dist/tagify.js",
"./dist/tagify.esm.js": "./dist/tagify.esm.js",
Expand Down
2 changes: 2 additions & 0 deletions src/react.tagify.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import React, {useMemo, useEffect, useRef, useCallback} from "react"
import {renderToStaticMarkup} from "react-dom/server"
import {string, array, func, bool, object, oneOfType} from "prop-types"
Expand Down

0 comments on commit 0ae33a6

Please sign in to comment.