requirejs-toggle

1.0.2 • Public • Published

requirejs-toggle

Allows you to turn off requirejs

I hope you will newer need this hack, but sometimes it can be very useful. See https://github.com/requirejs/requirejs/issues/947 for details.

<!-- Let's assume requirejs already active... -->
 
<!-- Using this script tag you can disable it -->
<script src="https://unpkg.com/requirejs-toggle"></script>
 
<!-- After that, this UMD script will register window.React variable instead of registering React as requirejs module -->
<script src="https://unpkg.com/react@15/dist/react.min.js"></script>
 
<!-- Then you can restore requirejs if you need it, using same script tag again -->
<script src="https://unpkg.com/requirejs-toggle"></script>

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    498
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    498
  • 1.0.1
    2
  • 1.0.0
    2
  • 0.9.0
    2

Package Sidebar

Install

npm i requirejs-toggle

Weekly Downloads

144

Version

1.0.2

License

MIT

Last publish

Collaborators

  • daniel.hreben