Closed andrevenancio closed 4 years ago
Can you share a repo or a codesandbox where the issue can be reproduced? It sounds very much like the aliasing isn't done correctly. Also note that preact-compat
only works with Preact 8.x. For Preact X you must use preact/compat
instead which ships in the preact
package itself.
You're right. In my case I had 2 webpack builds running one for DLL and another for my app. I only added the alias to the app not the DLL and my imports were on the DLL. so silly me. Also, giving Preact X a go cause I need hooks :) thanks!
I have an application running Preact, I'm importing snap-state module (which depends on React).
I get this error
Module not found: Error: Can't resolve 'react' in '/Users/XXX/YYYY/node_modules/snap-state/dist'
I've added the aliases to the webpack configuration as per the instructions on github... any way of testing what's wrong?