Skip to content

CodeMirror with require and define prefixed with noconflict_

Notifications You must be signed in to change notification settings

ResourcesCo/prefixed-globals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prefixed-globals

Load modules that require a full implementation of a loader, like RequireJS, in an environment where there is a custom module system that doesn't support everything RequireJS supports, by prefixing the module loader globals including require, define, module, and exports with __pg_.

Originally made to support loading CodeMirror in an Observable notebook.

You can provide a module system uses the prefixed globals, or simply let the modules fall back to using a global, like window.CodeMirror. Most UMD packages will use a global if they can't find a module system.

TODO

  • more packages
  • a sibling repo for npm packages that only support CommonJS so packages can be run without bundle.run which sometimes fails to load (it isn't as reliable as unpkg which has more servers thrown at it)

About

CodeMirror with require and define prefixed with noconflict_

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published