Closed thomas-p-wilson closed 7 years ago
Given:
moduleAlias.addAliases({ "react-dom": "preact-compat-enzyme", "react-dom/server": "preact-render-to-string" });
An attempt to require('react-dom/server') yields Error: Cannot find module 'preact-compat-enzyme/server'.
require('react-dom/server')
Error: Cannot find module 'preact-compat-enzyme/server'
I believe the simple solution would be to evaluate possible matches, and choose the longest.
Given:
An attempt to
require('react-dom/server')
yieldsError: Cannot find module 'preact-compat-enzyme/server'
.I believe the simple solution would be to evaluate possible matches, and choose the longest.