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

build(FEC-13273): Refactor webpack configuration Remove IE support and reduce bundle size #221

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JonathanTGold
Copy link
Contributor

@JonathanTGold JonathanTGold commented Jul 13, 2023

Description of the Changes

  • Upgrade the Webpack deps to align with the latest version
  • Refactor the webpack config to the newest syntax and best practices to reduce bundle
  • Fix the source-map configuration to enable proper debugging
  • Remove deprecated/unnecessary dependencies
  • Remove redundant/unused scripts from the package.json
  • Remove dist folder from the git tracked files on git
  • Add Safari & Firefox to script test (currently only chrome is covered)
  • Configure the package as multi exported modules as it should be
Asset Name Before After Reduction %
playkit-ovp-provider.js 47.7 KiB 35.7 KiB 25.13%
playkit-ott-provider.js 31.3 KiB 22.2 KiB 29.14%
playkit-analytics-service.js 10.5 KiB 7.81 KiB 25.90%
playkit-bookmark-service.js 9.17 KiB 6.76 KiB 26.32%
playkit-stats-service.js 9.82 KiB 7.16 KiB 27.06%
Total Improvement 26.11%

solves FEC-13273

CheckLists

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • test are passing in local environment
  • Travis tests are passing (or test results are not worse than on master branch :))
  • Docs have been updated

@@ -2,58 +2,51 @@
"name": "@playkit-js/playkit-js-providers",
"version": "2.39.4",
"description": "",
"exports": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this change require you to also make changes in the imports in packages that use one of the dist exports, like kava plugin which uses analytics service ?

"build": "webpack --mode production",
"dev": "webpack-dev-server --mode development",
"watch": "webpack --progress --colors --watch --mode development",
"build:dev": "webpack serve --open --mode=development",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use: {
loader: 'babel-loader',
options: {
presets: [['@babel/preset-env', {targets: 'defaults'}], '@babel/preset-flow']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does defaults support the browsers that the player needs to support ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants