Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to webpack v5 #1225

Closed
wants to merge 6 commits into from
Closed

Conversation

Yasamato
Copy link
Contributor

@Yasamato Yasamato commented Apr 29, 2021

Migrated to webpack v5 from v4 and upgraded dependencies to latest.

yarn outdated listed:

Package                                 Current  Wanted   Latest  Package Type    URL                                                                  
@babel/cli                              7.12.10  7.13.16  7.13.16 devDependencies https://babel.dev/docs/en/next/babel-cli                             
@babel/core                             7.12.10  7.13.16  7.13.16 devDependencies https://babel.dev/docs/en/next/babel-core                            
@babel/plugin-proposal-class-properties 7.12.1   7.13.0   7.13.0  devDependencies https://babel.dev/docs/en/next/babel-plugin-proposal-class-properties
@babel/preset-env                       7.12.11  7.13.15  7.13.15 devDependencies https://babel.dev/docs/en/next/babel-preset-env                      
@babel/preset-react                     7.12.10  7.13.13  7.13.13 devDependencies https://babel.dev/docs/en/next/babel-preset-react                    
@babel/register                         7.12.10  7.13.16  7.13.16 devDependencies https://babel.dev/docs/en/next/babel-register                        
@hot-loader/react-dom                   16.14.0  16.14.0  17.0.1  devDependencies https://github.com/hot-loader/react-dom#readme                       
@types/node                             14.14.22 14.14.43 15.0.1  devDependencies https://github.com/DefinitelyTyped/DefinitelyTyped.git               
@types/react                            17.0.0   17.0.4   17.0.4  devDependencies https://github.com/DefinitelyTyped/DefinitelyTyped.git               
autoprefixer                            9.8.6    9.8.6    10.2.5  devDependencies https://github.com/postcss/autoprefixer#readme                       
css-loader                              3.6.0    3.6.0    5.2.4   devDependencies https://github.com/webpack-contrib/css-loader                        
html-webpack-plugin                     4.5.1    4.5.2    5.3.1   devDependencies https://github.com/jantimon/html-webpack-plugin                      
memoize-one                             5.1.1    5.2.1    5.2.1   dependencies    https://github.com/alexreardon/memoize-one#readme                    
mini-css-extract-plugin                 0.9.0    0.9.0    1.5.1   devDependencies https://github.com/webpack-contrib/mini-css-extract-plugin           
postcss-loader                          3.0.0    3.0.0    5.2.0   devDependencies https://github.com/webpack-contrib/postcss-loader                    
postcss-nested                          4.2.3    4.2.3    5.0.5   devDependencies https://github.com/postcss/postcss-nested#readme                     
react                                   16.14.0  16.14.0  17.0.2  devDependencies https://reactjs.org/                                                 
react-dom                               16.14.0  16.14.0  17.0.2  devDependencies https://reactjs.org/                                                 
sanitize.css                            11.0.1   11.0.1   12.0.1  devDependencies https://github.com/csstools/sanitize.css#readme                      
sinon                                   9.2.3    9.2.4    10.0.0  devDependencies https://sinonjs.org/                                                 
snazzy                                  8.0.0    8.0.0    9.0.0   devDependencies https://github.com/feross/snazzy                                     
standard                                14.3.4   14.3.4   16.0.3  devDependencies https://standardjs.com                                               
style-loader                            1.3.0    1.3.0    2.0.0   devDependencies https://github.com/webpack-contrib/style-loader                      
ts-standard                             9.0.0    9.0.0    10.0.0  devDependencies https://github.com/standard/ts-standard                              
typescript                              4.1.3    4.2.4    4.2.4   devDependencies https://www.typescriptlang.org/                                      
webpack                                 4.46.0   4.46.0   5.36.1  devDependencies https://github.com/webpack/webpack                                   
webpack-cli                             3.3.12   3.3.12   4.6.0   devDependencies https://github.com/webpack/webpack-cli.git   

Deps-changes

  • For postcss-loader and postcss-nested >=5 devDependency postcss >=8 had to be added to devDep

Demo App

  • webpack-dev-server deprecated and should now be called via webpack serve

  • findDOMNode has been long deprecated, needed to adjust fullscreen example in demo

  • import { version } from '../../package.json' throws warning:
    Should not import the named export 'version' (imported as 'version') from default-exporting module (only default export is available soon), replaced it with import metadata from '../../package.json'

ts lint with react

React now requires (or strongly encourages you) to use null safety, added to .tsconfig

webpack config

  • query property has been removed from v5 and replaced it with use

  • query-string like loader 'file-loader?name=assets/[hash].[ext]' is disallowed, moved it to use property

  • TerserPlugin option sourceMap has been restructured and needed to be moved to terserOptions

default versions

  • hls 0.14.16 -> 1.0.2

  • dash 3.1.3 -> 3.2.2

  • flv already up to date

  • adjusted notice in README.md

Fixes #1215

Other deprecation warning:

(node:8465) [DEP_WEBPACK_COMPILATION_OPTIMIZE_CHUNK_ASSETS] DeprecationWarning: optimizeChunkAssets is deprecated (use Compilation.hooks.processAssets instead and use one of Compilation.PROCESS_ASSETS_STAGE_* as stage option)

@Yasamato
Copy link
Contributor Author

Yasamato commented Apr 29, 2021

I would like to hear your opinion @cookpete regarding my attempts to upgrade everything. I couldn't find anything that broke after my adjustments and am open to suggestions.

Yasamato added a commit to Yasamato/react-player that referenced this pull request Apr 30, 2021
As mentioned in cookpete#1225 `findDOMNode` is deprecated.
@cookpete
Copy link
Owner

Funnily enough I was considering moving everything to a create-react-app setup to get rid of the crazy amount of boilerplate stuff needed (and maintenance work like this). This is some awesome work though, thank you. I will have a closer look when I get some spare time.

@Yasamato
Copy link
Contributor Author

I am myself not really familiar with bundling and publishing myself. But if it can be done vie create-react-app in an easier way to distribute and maintain, feel free to abandon this PR

cookpete added a commit that referenced this pull request Feb 20, 2022
* Adjust listener for kaltura

Fixes #1202 and related to #1082.

* Fix lint

As mentioned in #1225 `findDOMNode` is deprecated.

* Add autoplay to iframe props

* Move code to load method and call it instead

* Update src/players/Kaltura.js

Co-authored-by: Pete Cook <pete@cookpete.com>

* Remove `this.load()` call in `componentDidMount`

Co-authored-by: Pete Cook <pete@cookpete.com>
@luwes
Copy link
Collaborator

luwes commented Oct 10, 2023

closed by #1684

@luwes luwes closed this Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to latest HLS.JS
3 participants