preactjs/preact-compat

preact-compat for third-party package

firegnu opened this issue · 3 comments

I use preact&&preact-compat in my project and have alias in my webpack config file. But some third-party package use react as well. So, The node_modules react third-party package will continue use react or preact&&preact-compat? I want third-party package use preact as well. what should i do? thanks

Since you already have set up webpack with aliases to preact-compat your bundle will not contain the react package. This will be true for any package you include in the bundle, regardless of whether they were coming from node_modules or your own path. React will be present in node_modules though, because npm doesn't read the webpack config and doesn't understand aliases.

So, the third-party library will use the preact as well?

yup 👍