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:
require(['jsx!one.js'],function(one){
//no problems
});
but when I want to reload a module like so, I get problems:
require.undef('jsx!one');
require([jsx!one.js],function(one){ //this line fails
//now we have problems, I get the classic React error: "SyntaxError: expected expression, got '<'"
//so it seems that the jsx transformer is not being reinvoked upon "reloading" the same file
});
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([]) ?
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([]) ?