308 Commits

Author SHA1 Message Date
Ryan Christian
8223ebaee8
fix: build message formatting (#948)
* fix: Build output message formatting w/ dynamic import module

* docs: Adding changeset
2022-04-21 09:46:29 -04:00
Ryan Christian
1d0e305d89
fix: tsconfig cwd differing from microbundle's cwd (#941)
* fix: 'tsconfig.json' search should start in the set cwd

* docs: Adding changeset
2022-04-20 15:15:11 -05:00
Ryan Christian
c4532cc9cc
docs: compress flag (#940)
* docs: Add info on --compress default value

* docs: Update CLI help menu --compress info

* docs: Adding changeset
2022-04-20 15:14:58 -05:00
MYCOIN
b51b855794
feat: [auto-commit] fix: _sizeInfo npe (#935)
* feat: [auto-commit] fix: _sizeInfo npe

* docs: Adding changeset

Co-authored-by: Ryan Christian <ryanchristian4427@gmail.com>
2022-04-07 17:52:26 -05:00
Ryan Christian
fb0a43780a
chore: Adding flag & docs for jsxFragment (#930) 2022-03-03 18:09:14 +01:00
Ryan Christian
392d63ef43
fix: Corrects CSS output being overwritten when .cjs ext used (#919) 2022-03-03 18:04:30 +01:00
Jason Miller
f04c85a188
Fix mangle.json being overwritten with [object Object] (#926)
* Fix mangle.json being overwritten with [object Object]

Regression from #882.

* Create gorgeous-singers-invite.md
2022-01-20 15:59:17 -05:00
Ryan Christian
dd0bdde9c6
fix: Ensuring CLI & docs match up with each other (#904) 2021-11-17 18:38:19 +01:00
Mihir Kumar
2a0ca8843f
feat: Closes #497: preserve trailing newline in mangle.json (#882)
Co-authored-by: Leah <github.leah@hrmny.sh>
2021-10-14 17:27:44 +02:00
Ryan Christian
26f382a989
fix: Corrects completion message to show the package's name, rather than the safe name (#895) 2021-10-11 21:39:44 +02:00
Jason Miller
96b85da1e3
Resolve using "node" export condition for --target node (#887)
* 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
2021-10-06 10:11:06 -04:00
Ryan Christian
29803364fe
feat: Expands generateTypes flag to support TS entries (#865)
* 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
2021-10-06 10:07:28 -04:00
Jason Miller
5e93a0e4cc
Fix exports walk (#852) (#853)
* Fix exports walk (#852)

Fixes #852

* Create eight-toes-pump.md

* traverse default exports in type:module packages
2021-10-06 09:59:44 -04:00
Marco Solazzi
5d0465b39b
Fix: preserve terser annotations regexp (#875)
* fix: preserve terser annotations regexp

* chore: add changeset

* test: update snapshots
2021-10-06 09:14:03 -04:00
Marc Bouchenoire
1b61029664
Rebase: Add worker-loader (#867)
* 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>
2021-10-06 09:09:49 -04:00
Marc Bouchenoire
b1a6374862
Fix: Support booleans in minify options (#858)
* Add fixture

* Prevent boolean minify options from being replaced

* Update snapshots

* Add changeset
2021-06-28 12:09:57 -04:00
Jason Miller
3534815dda
Bugfix: preserve Terser annotations during Babel pass (#848)
* 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
2021-06-11 15:36:21 -04:00
G3root
680c25c505
Fix: throw a warning when no entrypoint is found (#843)
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
Co-authored-by: nafees nazik <nafeesnazik10@gmail.com>
2021-06-05 13:04:03 +02:00
Ryan Christian
86371f0db6
feat: Support customizing the modern output via "exports" (#784)
* 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>
2021-06-03 11:30:43 -04:00
Ryan Christian
6f1a20fa17
fix: Extra CSS files generated (#777)
* fix: Ensuring duplicate CSS files aren't generated

* docs: Adding changeset

* Update index.js

Co-authored-by: Jason Miller <developit@users.noreply.github.com>
2021-05-26 20:58:42 -04:00
Ryan Christian
89ab03da09
docs: Swapping out references of ES format to ESM (#778) 2021-05-26 04:13:55 +02:00
Ryan Christian
0c91795957
Fix/css filename output (#841) 2021-05-26 03:57:48 +02:00
Andreas Heissenberger
a7f7265727
wenn package.json "type":"module" switch default type to ".cjs" for CommonJS build (#802)
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
2021-05-05 15:47:31 -04:00
Hyeseong Kim
25b73d22ca
feat: enabled config overriding by publishConfig (#834)
* feat: enabled config overriding by publishConfig

* add changesets

* update README

* Update odd-pets-type.md

Co-authored-by: Jason Miller <developit@users.noreply.github.com>
2021-05-05 11:36:39 -04:00
Guido D'Orsi
7426218d48
fix(transform-fast-rest): rest parameters references with closures (#798)
* fix(transform-fast-rest): rest parameters references with closures

* fix(transform-fast-rest): improved the arguments scope check
2021-05-05 11:13:00 -04:00
JounQin
54402ac43c
fix: add generateTypes cli option, check false value correctly (#830)
* fix: add generateTypes cli option, check false value correctly

* chore: add changeset file

* docs: cli option should be generateTypes

* chore: remove unnecessary comment
2021-05-05 10:51:54 -04:00
Guido D'Orsi
bb5789a522
fix(cli): corrects the --sourcemap=false option parsing (#799) 2021-02-02 14:54:17 -05:00
Cody Olsen
9ccf400421
restore CSS sourcemap support (#770)
* 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>
2020-12-18 21:29:26 -05:00
Jason Miller
967f8d5327
Add --css inline option (#769)
* Add --css inline option

Fixes #744

* Add CLI option

* Add docs for --css and update --css-modules docs

* Create rude-keys-eat.md

* update snapshot
2020-12-18 14:55:00 -05:00
Jason Miller
25b2b62d24
Add --generate-types option (#589) 2020-12-18 20:17:23 +01:00
Jacob Baker-Kretzmar
fdafaf7a4a
Add support for generating inline sourcemaps (#764)
* 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
2020-12-18 14:03:27 -05:00
Jason Miller
2ed56334cb
Rollup upgrade size fixes (#767)
* chore: update dev dependencies

* chore: update non rollup deps

* upgrade rollup

* update rollup-plugin dependencies

* add changeset

* Disable new external ESM interop

* Update Terser options to include __PURE__ annotations

* Remove `globalThis` injection

* bugfix

* update snapshots

* Update package.json

* Update package-lock.json

* strip globalThis from unminified UMD bundles too

* update shapshots

Co-authored-by: Ward Peeters <ward@coding-tech.com>
2020-12-18 14:02:35 -05:00
Ward Peeters
bd5d15e17c
chore: upgrade all dependencies (#738)
* chore: update dev dependencies

* chore: update non rollup deps

* upgrade rollup

* update rollup-plugin dependencies

* add changeset
2020-12-18 12:22:33 -05:00
Cody Olsen
8b60fc86cb
fix(CSS): sourcemap support for PostCSS files (#754)
* fix(CSS): sourcemap support

* Create hip-spies-happen.md
2020-12-17 11:00:53 -05:00
Gino Zhang
8142704399
Use user's typescript first, fallback to bundled (#741)
* use process.cwd()'s typescript

* use process.argv[1]'s instead of process.cwd()'s typescript

* Handle situation that argv1 is empty

* changeset

* Require "typescript" from cwd i.o. argv1
2020-12-17 10:27:18 -05:00
Jason Miller
12668b9939
Friendly microbundle-specific resolve errors (#687) 2020-09-28 04:12:21 +02:00
Jason Miller
052786223e
Support "esm" as an alias of "es" format (#722)
Co-authored-by: Leah <github.leah@hrmny.sh>
2020-09-28 03:24:45 +02:00
Colin van Eenige
d33a7ba2f5
Add jsxImportSource flag for new JSX runtime (#731)
Co-authored-by: Leah <github.leah@hrmny.sh>
2020-09-24 11:35:14 +02:00
Ward Peeters
7b2ff57f87
fix: bring back @babel/env preset match (#714) 2020-09-03 00:19:07 +02:00
Jason Miller
ffcc9d9b7d
Support global extend via amdName (#713)
* Support global extend via amdName

Using a prefixed name like `{ "amdName": "global.foo" }` will trigger Rollup's `output.extend` option. This addresses the use-case from #709 without adding another CLI flag.

* Create chilled-paws-confess.md

* Update chilled-paws-confess.md
2020-08-31 17:00:45 +02:00
Ward Peeters
d08f977aa6
fix: use @babel/preset-env with bugfixes for modern builds (#702) 2020-08-28 17:11:28 +02:00
Jason Miller
225e35072c
Don't transpile generators and async for Node (#707)
I think this should fix #704.
2020-08-23 06:52:10 +02:00
Ward Peeters
ba1c047512
chore: enable unpkg alias again (#701) 2020-08-17 09:07:28 +02:00
Ward Peeters
34884116e2
fix: disable node-builtin warnings (#700) 2020-08-17 08:52:22 +02:00
Jason Miller
305a50fb7a
[draft] Use Babel to transpile JSX instead of TypeScript (#573)
Co-authored-by: Leah <me@hrmny.sh>
Co-authored-by: Leah <github.leah@hrmny.sh>
2020-07-20 22:05:26 -04:00
Jason Miller
037b0f26d3
refactor: split utilities in separate files (#624)
Co-authored-by: Ward Peeters <ward@coding-tech.com>
2020-07-07 23:47:45 +02:00
Katja Lutz
658d867900
refactor: use rollup dir and entryFileNames options instead of file (#674) 2020-07-04 15:33:36 +02:00
Katja Lutz
1d609126bf
Add onStart and onError callbacks, accessible rollup watchers (#668) 2020-06-29 22:48:09 +02:00
Katja Lutz
5f1a6a9e3f
fix: dont set aliases as externals (#671) 2020-06-29 22:45:30 +02:00
Jason Miller
302807d655
Strip comments from output (#548) 2020-06-29 22:37:10 +02:00