developit / microbundle

📦 Zero-configuration bundler for tiny modules.
https://npm.im/microbundle
MIT License
8k stars 361 forks source link

Cannot alias react and react-dom #1020

Closed imaitland closed 1 year ago

imaitland commented 1 year ago

I'm using microbundle to build a preact app for distribution. Inside my preact app I am using a react library. To do this I need to alias react to preact/compat.

This is working:

microbundle build --alias react=preact/compat

But having more than one alias throws an error:

microbundle build --alias react=preact/compat react-dom=preact/compat

Error: No entry module found for "my-app-name"

rschristian commented 1 year ago
$ microbundle build --alias react=preact/compat,react-dom=preact/compat

Spaces in any CLI, not just Microbundle, signify separate arguments or flags.

imaitland commented 1 year ago

Thanks, yep that was it, closing.