It is possible to use Hypernova with Preact?
See original GitHub issueHello. I’m trying to use Hypernova with Preact, but getting following error:
Development Warning! The 0 component failed to render with Hypernova. Error stack:
Error: Cannot find module 'react'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/mnt/c85468c5-7b6f-4c14-9ba0-b42dccaed6bc/commercial/cscp/app/javascript/components/application/login.js:1:1)
at Module._compile (module.js:571:32)
at loader (/usr/local/lib/node_modules/babel-cli/node_modules/babel-register/lib/node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (/usr/local/lib/node_modules/babel-cli/node_modules/babel-register/lib/node.js:154:7)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at getComponent (/mnt/c85468c5-7b6f-4c14-9ba0-b42dccaed6bc/commercial/cscp/config/hypernova.server.js:7:12)
at BatchManager.render (/mnt/c85468c5-7b6f-4c14-9ba0-b42dccaed6bc/commercial/cscp/node_modules/hypernova/lib/utils/BatchManager.js:170:22)
at /mnt/c85468c5-7b6f-4c14-9ba0-b42dccaed6bc/commercial/cscp/node_modules/hypernova/lib/utils/lifecycle.js:170:22
I’m also trying to add this lines to my webpack config but it didn’t give any result:
alias: {
'react': 'preact-compat',
'react-dom': 'preact-compat'
}
Any clues on that?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6
Top Results From Across the Web
Switching to Preact (from React)
Switching to Preact can be as easy as installing and aliasing preact-compat in for react and react-dom . This lets you continue writing...
Read more >дэн on Twitter: "@pspeter3 @marvinhagemeist @preactjs ...
Another thing to consider is that AFAIK most people use Preact in the compat mode — which has worse runtime characteristics even than...
Read more >React Server Side Rendering with Hypernova - Blog
But you begin to wonder, how can I improve performance on the client? The answer, of course, is Server Side Rendering!
Read more >Nova Preact · Ara Framework
Preact bindings for Hypernova. Install package. npm install hypernova-preact ... Integrate it in your website using Nova Proxy, see details on page Render ......
Read more >Mobius: Adopting JSX While Prioritizing User Experience - Etsy
Given all this, being able to use JSX components everywhere in our ... It felt like a risk to rely on the developers...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@tanraya you can take a look at this bindings for Preact. https://www.npmjs.com/package/hypernova-preact
Closing, since the package now exists.