Repository navigation
0.21.1
The component's behavior is unchanged, but the package is now built with Vite instead of webpack. Check the packaging changes below if you use an older bundler or runtime, or load the UMD build.
- Add TypeScript type definitions (
dist/react-highlight-words.d.ts), including exportedHighlighterProps,HighlightTagProps,UnhighlightTagProps,ChunkandFindChunksOptionstypes. - Add an ES module build (
dist/react-highlight-words.js), exposed through themodulefield. - Move the CommonJS entry point from
dist/main.jstodist/react-highlight-words.cjs.require("react-highlight-words")still returns the component directly. - Target modern JavaScript (ES2018+: object spread, destructuring defaults,
const/let) instead of ES5. Environments that can't parse that syntax need to transpile the package. - Stop bundling
highlight-words-coreinto the build; it is installed as a regular dependency (^1.2.0). - Lowercase the keys of an object
highlightClassNameonce per render instead of once per match (whencaseSensitiveisfalse). - Remove the UMD build (
dist/main.umd.js). - Remove the
memoize-onedependency.