Closed pe3 closed 9 years ago
I would love to help if you can help me understand what to do. To me it seems the eval-module is throwing the error. For me something like this comes to mind:
var eval = require('eval')
var eval2 = function(str) {
var cleared = str.replace(/console.*\)\;/, "");
return _eval(cleared);
}
var res = eval2('var x = 123; console.log(x); exports.x = x')
console.log(res);
I’m getting a similar error. require is not defined
.
This should be fixed in v2.2.0. Please let me know if you're still having issues.
I originally wrote an issue to css-modules/webpack-demo but now I understand this is the right repo. Is there any way to make the plugin easier to use?
npm start
window.React = React;
to src/index.js I get this error:Adding
console.log('hello');
causes a similar error.Can be avoided with:
Could this be avoided somehow? It's a bit unconventional and can for example cause hard to understand problems for people who test you code.