Is it possible to use RequireJS 2 to dynamically reload a recently updated .js file? Let me explain my scenario:
- I have a Backbone.js object named Foo with a function called Bar that currently displays an alert with "abc" when called;
- In my webpage, I execute
Foo.Bar()
and receive an alert with "abc" - In my code editor, I modify the function to display an alert with "def" instead of "abc"
- Back on the webpage, I open the console and trigger an update function
- Upon calling
Foo.Bar()
again, I now receive an alert with "def"
Appreciate the help!