Open ORESoftware opened 9 years ago
and here's the rub:
whereas the above with require fails, using define works!
require.undef('jsx!two');
define(['jsx!two'],function(file){
cb(null,file);
});
so there seems to be some difference between require and define that I am missing
the following link to a project serves as an example as to the problems I am having using JSXTransformer with this library and RequireJS https://github.com/ORESoftware/requirejs-jsx-example/tree/master
hey there!
I tried Carvalho's jsx library and yours, and both seem to fail in a particular case and I am trying to figure out why.
I am trying to enable hot reloading with RequireJS, and using requirejs.undef seems to be the way to go.
I am able to get the hot reloading / hot swapping to work with RequireJS for .html files, and next up is JavaScript files.
The problem I have seems to boil down to this:
but when I want to reload a module like so, I get problems:
I really am not sure why this is happening, but I do strongly believe that the jsx plugin and / or JSXTransformer is not being re-invoked when the same file is reloaded.
Does this make any sense? Do you think you could help me investigate while the JSXTransformer is not being re-invoked upon reloading a file with require([]) ?