Hello.
After deciding to move to Preact, i tried to see how preact-compat works first. so i tried it on a minimal react16 app created with create-react-app:
1- I created a new React app using create-react-app cli
2- I ejected application to have access to webpack config files
3- I installed preact and preact-compat using npm
4- Then added aliases to webpack.config.prod.js as mentioned here
5- Then i used preact build --no-prerender to build for production
6- When i tried to serve the app from build directory, it did not work :/
I get an error in browser console saying:
It happen in render$1 function in preact-compat.es.js file:
Which is called from ReactDOM.render function from index.js (entry of react app):
Did i miss anything? I tried using preact-compat on several projects of mine and got same error every single time.
Hmm - why are you using preact build? If it's a create-react-app application, you should build the same way you would any other create-react-app application. Preact CLI isn't required to use Preact.
Hello. After deciding to move to Preact, i tried to see how preact-compat works first. so i tried it on a minimal react16 app created with create-react-app:
1- I created a new React app using create-react-app cli 2- I ejected application to have access to webpack config files 3- I installed preact and preact-compat using npm 4- Then added aliases to webpack.config.prod.js as mentioned here 5- Then i used preact build --no-prerender to build for production 6- When i tried to serve the app from build directory, it did not work :/
I get an error in browser console saying:![alt text](http://oi68.tinypic.com/10zolu0.jpg)
It happen in render$1 function in preact-compat.es.js file:![alt text](http://oi68.tinypic.com/dyn5p1.jpg)
Which is called from ReactDOM.render function from index.js (entry of react app):![alt text](http://oi67.tinypic.com/2a7it8o.jpg)
Did i miss anything? I tried using preact-compat on several projects of mine and got same error every single time.