Notas Hellout

Results 150 comments of Notas Hellout

It seems the solution is to give up on custom configurations and let `microbundle` decide. `microbundle` bears the responsibility of setting the correct configuration to obtain correct builds for contemporary...

Another solution seems to be to explicitly rely on `@babel/plugin-transform-for-of`, for instance: ```json ... "presets": [ [ "@babel/preset-env", { "targets": [ "defaults", "maintained node versions" ] } ] ], "plugins":...

> ```js > // index.cjs.js > import GoogleMap from './google_map'; > import { namedExport1, namedExport2 } from './named_exports; > Object.assign(GoogleMap, { namedExport1, namedExport2 }); > export default GoogleMap; > ```...

Would the following work? ```js import GoogleMap from './google_map'; import { namedExport1, namedExport2 } from './named_exports; export default GoogleMap; const default = GoogleMap; export { default, namedExport1, namedExport2 }; ```...

I cannot promise to find time to produce a minimal failing example. Currently, I workaround the problem by either disabling mangling, or marking all named imports that match the `regex`...

For the UMD build it's worse: since exports are created with `function(exports) { ... ; exports._fn = x; }` even internal exports names that match the `regex` get mangled, in...

@donmccurdy Why do you think exports might not help? Have you read https://nodejs.org/api/packages.html#packages_conditions_definitions and https://nodejs.org/api/packages.html#packages_conditional_exports? There it is explained that a `"browser"` key can be used.

@donmccurdy Ah! For multiple sources I believe you have to run microbundle multiple times. The same way you have to run it multiples times if you want to export multiple...

I'll try migrating to `"exports"`. Thanks @rschristian!

[I tried using `exports` with the exact same filenames](https://github.com/xn-js-b9bae/xn--mxaac/commit/50c5862e95572a082dd353dbc1a53fa0659e42a8) but it still wants to add `.modern` before `.js`: ``` $ npm-run-all --parallel build:* $ microbundle --cwd packages/api --target web --format...