learningequality / learningequality/studio

Webpack configuration can create bundles that are not ES5 compatible

Open
#2,874 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DEV: dev-ops P2 - normal TAG: tech update / debt
Dominant language
Python
Stars
191
Forks
307
Avg merge
5d 6h
Merged PRs (30d)
10

Description

Summary

A studio user contacted us saying they were only seeing a white page, after resolving issues with accessing the old login page. It turns out they're using an old version of Firefox, that's encountering an error because of arrow functions in the service worker bundle. Our intention is that all bundles are ES5 compatible which they're not currently.

After further inspection, @rtibbles determined that our node_modules exclusion was likely causing the issue. Proposed update:

exclude: /node_modules\/(?!((kolibri-design-system)|(workbox[a-z\-]+))\/).*/,

Category

BUG

Usage Details

  • Browser: Old version of Firefox

Screenshots

Screenshot (18)

Real-life consequences (anything community should be aware of, for instance how it affects end users)

Users are required to update their browsers

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in webpack.config.js around the node_modules exclusion at line 123 and review how the service worker bundle is transpiled. Apply the proposed exclusion adjustment, then run the relevant webpack build and verify that generated bundles do not contain arrow functions and remain usable in older Firefox.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system, web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.