twilio / twilio-video-app-react

A collaboration application built with the twilio-video.js SDK and React.js
Apache License 2.0
1.8k stars 725 forks source link

How to add webpack loader? #789

Closed koopeek closed 1 year ago

koopeek commented 1 year ago

Question How to add webpack loader to this project?

Additional context We have our app built on top of this repository and now we are adding an external chat provider (stream chat). Our problem is that whenever we try to render their components we are getting errors, eg:

Error: Module parse failed: Unexpected token (24:23)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| export const createReactPlayer = (players, fallback) => {
|   return class ReactPlayer extends Component {
>     static displayName = 'ReactPlayer'
|     static propTypes = propTypes
|     static defaultProps = defaultProps

I assume the problem might be with the raw css they use in the stream. Any ideas on how I can fix this issue?