Skip to content

Commit 7d80383

Browse files
sravan-sSravan S
andauthored
doc: add fix for webpack 5 breaking change (#150)
fixes: https://sendbird.atlassian.net/browse/UIKIT-1717 Co-authored-by: Sravan S <[email protected]>
1 parent 086600e commit 7d80383

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,24 @@ npm run lint
102102
* .eslintrc.json lints ts files and .eslintrc.js lints js files
103103
* Type definition file can be `src/index.d.ts` which will be copied to `/release` directory
104104

105+
### Webpack 5
106+
107+
Webpack 5 removes stream and buffer componets from default polyfill
108+
To enable these, install buffer and stream and then add the following to webpack.cofig.js
109+
```javascript
110+
module.exports = {
111+
//...
112+
resolve: {
113+
fallback: {
114+
buffer: require.resolve('buffer'),
115+
stream: require.resolve('stream-browserify'),
116+
},
117+
},
118+
};
119+
120+
```
121+
To read more: https://webpack.js.org/configuration/resolve/#resolvefallback
122+
105123
### Creating/exporting new components
106124

107125
1. Define your component inside './src'

0 commit comments

Comments
 (0)