Closed pe3 closed 9 years ago
Now I get it. From react-to-html-webpack-plugin:
Warning! This plugin executes your code in a Node context after each compilation.
So this can be avoided with:
if (typeof window !== 'undefined') {
console.log('hello');
}
I didn't get window.React
to work but I may be some other issue.
Great demo! I get errors which I don't understand when I add browser related Objects to index.js
npm start
window.React = React;
to src/index.js I get this error:Adding
console.log('hello');
causes a similar error. What might cause this?I'm asking because I would like to use this demo as a base for a project.