stremio-web
stremio-web copied to clipboard
Webpack 5 Polyfill Fix
There are tons of errors because stremio-web
relies on Polyfills that existed in Webpack 4 and lower, but no longer exist in Webpack 5.
It can be fixed in two ways. One way is to specifically import the missing libraries.
The other, easier way, is to import a "polyfill" plugin which automatically loads the polyfill libraries into webpack 5.
To do that, here are the necessary changes:
- Add
node-polyfill-webpack-plugin
topackage.json
dependencies. - Manually edit the
webpack.config.js
file and paste the following at the top with the other imports:
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
3.Scroll down into the module.exports.plugins
array, and add this line at the top, above all other plugins:
new NodePolyfillPlugin(),
With these changes, along with my other ticket changes (#287 and #286) it becomes possible to run stremio-web
on the latest Node.
Hello, can I work on this?
What are the errors you see? How to reproduce this?