Skip to content

Extracted Discussion XBlock: Bundle up all JS files with webpack #480

@salman2013

Description

@salman2013

Description:

Right now multiple files are loading in student_view, we need to bundle them in one JS file and load it to render the block.

Current Implementation in edx-platform: #451 (comment)

Things to look:
The js code using for discussion block is classic ES5 JavaScript using an IIFE (Immediately Invoked Function Expression) with Backbone.js, jQuery, and global references.(Ref file)

Webpack does support classic ES5 + IIFE code, but it changes the execution context, which breaks legacy code that assumes this === window and globals exist implicitly.

Parent ticket: openedx/edx-platform#36539

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

🔖 Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions