-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: include built-in XBlock JS directly rather than copying it (#3…
…2480) As part of the static asset build, JS modules for most built-in XBlocks were unnecessarily copied from the original locations (under xmodule/js and common/static/js) to a git-ignored location (under common/static/xmodule), and then included into the Webpack builld via common/static/xmodule/webpack.xmodule.config.js. With this commit, we stop copying the JS modules. Instead, we have common/static/xmodule/webpack.xmodule.config.js just reference the original source under xmodule/js and common/static/js. This lets us us radically simplify the xmodule/static_content.py build script. It also sets the stage for the next change, in which we will check webpack.xmodule.config.js into the repository, and delete xmodule/static_content.py entirely. common/static/xmodule/webpack.xmodule.config.js before: module.exports = { "entry": { "AboutBlockDisplay": [ "./common/static/xmodule/modules/js/000-b82f6c436159f6bc7ca2513e29e82503.js", "./common/static/xmodule/modules/js/001-3ed86006526f75d6c844739193a84c11.js", "./common/static/xmodule/modules/js/002-3918b2d4f383c04fed8227cc9f523d6e.js", "./common/static/xmodule/modules/js/003-b3206f2283964743c4772b9d72c67d64.js", "./common/static/xmodule/modules/js/004-274b8109ca3426c2a6fde9ec2c56e969.js", "./common/static/xmodule/modules/js/005-26caba6f71877f63a7dd4f6796109bf6.js" ], "AboutBlockEditor": [ "./common/static/xmodule/descriptors/js/000-b82f6c436159f6bc7ca2513e29e82503.js", "./common/static/xmodule/descriptors/js/001-19c4723cecaa5a5a46b8566b3544e732.js" ], // etc } }; common/static/xmodule/webpack.xmodule.config.js after: module.exports = { "entry": { "AboutBlockDisplay": [ "./xmodule/js/src/xmodule.js", "./xmodule/js/src/html/display.js", "./xmodule/js/src/javascript_loader.js", "./xmodule/js/src/collapsible.js", "./xmodule/js/src/html/imageModal.js", "./xmodule/js/common_static/js/vendor/draggabilly.js" ], "AboutBlockEditor": [ "./xmodule/js/src/xmodule.js", "./xmodule/js/src/html/edit.js" ], // etc } }; Part of: #32481
- Loading branch information
1 parent
51079e5
commit 9d4163d
Showing
6 changed files
with
174 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.