You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Webpack should build and successfully alias preact.
Actual Behavior
Receiving this error when bundling with webpack using the configuration above.
ModuleNotFoundError: Module not found: Error: Package path ./compat/server is not exported from package /<removed_path>/node_modules/preact (see exports field in /<removed_path>/node_modules/preact/package.json)
Looking at the exports configuration in preact package.json I see
Yeah this should be doable. Another option would be to change the key to "default" instead of "require". If you want to submit a PR I can give it a review!
I am upgrading from Webpack 4 to 5 and coming across an issue.
Reproduction
Using preact 10.4.8, webpack 5.11.0, TypeScript 4.1.3
TSConfig
Relevant Webpack config
Expected Behavior
Webpack should build and successfully alias preact.
Actual Behavior
Receiving this error when bundling with webpack using the configuration above.
Looking at the exports configuration in preact package.json I see
I am able to get this to work by adding support for "import" under "./compat/server" like so:
Is this something we can add or get a .mjs version out there for server.js?
The text was updated successfully, but these errors were encountered: