webclient files assume only CommonJS style modules would be present
Open
- Dominant language
- JavaScript
- Stars
- 5k
- Forks
- 454
- PR merge metrics
- No merged PRs in 30d
Description
When using the ShareJS web client files in an app that has separate AMD-style modules, `require` is defined, but `module.exports` is of course not. This results in a situation where ShareJS is doing things like `require('./microevent')`, even though no such module has been defined.
Checking for `require` is not sufficient to determine that CommonJS-style modules are present. It's probably better to check for both `require` and `module`.
The unfortunate temporary workaround for this is having to vendor in "webclient/share.js" and stick a `var require;` at the top of the IIFE.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.