Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Write webpack stats file to right place (so static assets can load)
After the removal of paver, static assets build wasn't completing properly in edxapp -- static files were written to the correct directory in the assets volume (mounted under /edx/var) but the webpack-stats.json files were written to the test_root dir in the app container (under /edx/app). The service would fail on first page load as it failed to find the stats file, which is apparently used for locating resources. The static assets build was also taking quite a long time and a lot of CPU, which is likely because we were doing the production-style build with full optimization. - Set static-root environment variables so that webpack-stats.json is written to the right place. See `staticRootLms` and `staticRootCms` in `webpack.common.config.js` in edx-platform for where that default is set. Set both LMS/CMS vars for both lms and cms since there's some dependency of CMS on LMS in the logic (and both calls build both sets of files, for better or worse). - Use npm dev build for reduced optimization (faster build). Also: - Use same spelling of `--no-input` for both calls (either works, just make it uniform) Addresses #65
- Loading branch information