* Resolve using "node" export condition for --target node
When bundling for a Node.js target, Microbundle should follow the "node" conditional package export key to match Node's own resolution. Fixes#886.
* lint
* Create fuzzy-trains-switch.md
* Update index.js
* feat: Expands generateTypes flag to support TS entries
* fix: Returning previous .d.ts generation
* test: Modifying `--generateTypes false` test for use on TS projects
* docs: Adding changeset
* Add worker-loader
Targets enhancement: https://github.com/developit/microbundle/issues/170
Enable usage of `microbundle --worker-loader` to apply rollup-plugin-web-worker-loader.
Allow bundling web workers automatically
- Add flag `--worker-loader`
- For format `es` and `modern`, a Worker `type: module` is automatically
bundled
* Update README.md
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
* Update src/index.js
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
* Update src/prog.js
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
* Update test/__snapshots__/index.test.js.snap
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
* Update test/fixtures/worker-loader/package.json
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
* Update README.md
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
* Remove node_modules from snapshot
* Upgrade rollup-plugin-off-main-thread
* Add changeset
Co-authored-by: Tim Daubenschütz <tim@daubenschuetz.de>
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
* Bugfix: preserve Terser annotations during Babel pass
We were stripping out everything except `__PURE__`, but Terser has a number of annotations using that format - these were previously being ignored.
* Create late-bags-argue.md
* Add test for Terser annotations
* feat: Support customizing the modern output via "exports"
* docs: Adding changeset
* refactor: Further support "modern" output name with exports object
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
* fix: Correcting odd typo
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
* docs: use "exports" key in all examples
Replace a leftover 'esmodule' key with the current recommendation.
* docs: add CommonJS bundle to exports
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
* docs: consolidate `package.json` samples
Merge the two microbundle build examples and refer
to Node.js docs for more information on the different fields.
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
* fix: restore CSS sourcemap support
* no CSS maps when inline
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
* Add failing test and snapshots
* Allow 'inline' value for sourcemap option
* Use string "true" as default sourcemap option
* Update test and snapshots
* Remove default
* Add warning message
* Add changeset