developit / microbundle

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

Multiple build time constants #901

Closed zeusdeux closed 2 years ago

zeusdeux commented 2 years ago

Hi folks! How can one --define multiple build time constants?

Passing --define n number of times fails with TypeError: globalStrings.split is not a function in parseMappingArgument which I believe comes from this invocation — https://github.com/developit/microbundle/blob/master/src/index.js#L374

zeusdeux commented 2 years ago

Ah, nvm, sorted. Got it from the code comment here. It's --define A=1,B=2

Thanks!