Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build: fix race condition in demo (#8827)
(fixes eslint/archive-website#363) Since 3ec436e was committed, the demo at http://eslint.org/demo has occasionally failed to load properly -- see eslint/archive-website#363 for more details. It appears that the issue was caused by a change to the build process in that commit which involved placing two browserified modules in the same bundle file. Based on #8465 (comment) this was changed in order to pass the tests in karma, but the tests seem to pass without the change. I'm not exactly sure what the root cause of the issue is. It only occurs when an unrelated file is loaded by requirejs after the eslint bundle, and that unrelated load files. My best guess at the moment is that requirejs was only able to infer the module name of the eslint bundle correctly when it contained a single anonymous module. When it contained two anonymous modules, requirejs couldn't infer their names, so it threw an error if there were no more modules to load after that. Depending on the state of the browser cache and the network, there would only sometimes be another module left to load after loading the eslint bundle, so this led to seemingly random errors in the demo.
- Loading branch information