70 Commits

Author SHA1 Message Date
Alistair Smith
f674d582bc
feat: support bun plugin (#539)
* loose start for bun plugin

* implement bun

* support emitFile()

* fix Bun cases in integration test

* add bun to other test files

* remove bun-types-no-globals from github

* restore bun-types-no-globals from npm @^1.2

* bun does not yet support .onEnd, so for now we shouldn't fake it with brittle workarounds

* add Bun in the documentation

* some missing bun references in docs

* support multiple plugins

* use Bun namespace instead of importing module that won't necessarily exist

* Bun is a cute pink color!

* fix the transform hook

* fix for virtual modules

* tidy up

* setup bun in ci

* revert unplugin require path

* ignore bun in test-out folders

* update tests

* support onEnd

* remove

* implement guessLoader(), bun also now supports onEnd()

* don't eat errors/warnings

* we dont need to outdir for bun in this test

* bun writebundle test

* Update to bun@1.2.22 (supports onEnd and onResolve)

* use onStart()

* define onStart() in mocks

* onStart

* ci: run vitest in Bun so we can run bun's tests

* Bun error message if building outside of Bun

* skip bun specific tests when not running in bun

* refactor

* allow only

* ci: fix typecheck

---------

Co-authored-by: Kevin Deng <sxzz@sxzz.moe>
2025-11-03 18:30:00 +08:00
Kevin Deng
213829882e
chore: fix lint 2025-11-03 17:15:04 +08:00
Julien Elbaz
365188ec99
feat(rspack): use native virtual plugin (#542) 2025-08-28 14:07:33 +08:00
Iwo Plaza
97f20367e0
fix: exact optional property types (#500) 2025-06-27 21:31:14 +08:00
renovate[bot]
037661cc66
chore(deps): update all non-major dependencies (#512)
* chore(deps): update all non-major dependencies

* fix lint

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2025-06-07 17:37:17 +08:00
Julien Elbaz
25b5205d74
fix: rollback webpack __vfsModules to use a Set (#507) 2025-05-13 23:26:50 +08:00
Julien Elbaz
9f68016ebb
fix(rspack): prevent vfs concurrency issues (#504) 2025-05-06 11:31:53 +08:00
三咲智子 Kevin Deng
6f212172b1
refactor: export FilterPattern for compatibility 2025-04-10 06:32:49 +08:00
Kevin Deng 三咲智子
b9fde6010a
feat: support resolveId/load/transform.filter, deprecate loadInclude & transformInclude (#494)
* feat: filters

* docs: update

* impl

* test: filter

* fix

* refactor

* refactor

* test: refactor
2025-04-10 06:28:45 +08:00
三咲智子 Kevin Deng
ca8a2b0b7d
feat: add unloader framework
See https://github.com/sxzz/unloader
2025-02-11 19:15:45 +08:00
三咲智子 Kevin Deng
930cb31784
fix(esbuild): get original esbuild context on getNativeBuildContext 2025-01-08 13:10:22 +08:00
三咲智子 Kevin Deng
9f85a26038
fix(esbuild): pass original build for custom esbuild setup 2024-12-30 09:22:06 +08:00
三咲智子 Kevin Deng
c9806326d5
feat!: drop meta.build for esbuild
Use `this.getNativeBuildContext` instead
2024-11-30 02:29:35 +08:00
Kevin Deng 三咲智子
19c95b16cc
refactor!: drop webpack 4 (#440)
* refactor: drop webpack 4

* fix types

* fix lockfile
2024-11-29 00:34:26 +08:00
三咲智子 Kevin Deng
2ebf5f5a61
refactor: re-organize types 2024-11-29 00:33:58 +08:00
三咲智子 Kevin Deng
d70264160f
fix: type error 2024-11-29 00:24:42 +08:00
三咲智子 Kevin Deng
73322a9f66
chore: upgrade lint 2024-09-26 16:26:28 +08:00
Michael James
1d1e064e96
feat: expose native build context (#404)
* Allow access to rspack and webpack LoaderContext in the UnpluginBuildContext that is available in the load and transform hooks

* refactor

* fix: no native context for vite and roll{up,down}

---------

Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
2024-09-09 23:11:25 +08:00
三咲智子 Kevin Deng
f89a01221d
refactor: update rolldown package name 2024-07-23 11:34:28 +08:00
Julien Huang
d92b88e132
fix: allow void in TransformResult (#392) 2024-06-29 00:38:37 +02:00
ADNY
731a596d3a
feat: support farm plugin (#341)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2024-03-13 09:36:41 +01:00
三咲智子 Kevin Deng
6d06ae1f21
feat: add rolldown support (#370) 2024-03-09 00:41:21 +08:00
三咲智子 Kevin Deng
3e1d52101e
feat(esbuild): support transform hook for nested plugins 2024-03-03 23:02:55 +08:00
三咲智子 Kevin Deng
0c5299e1f4
chore: upgrade eslint preset 2024-02-06 13:16:21 +08:00
三咲智子 Kevin Deng
8f00f571f8
feat: support emit object errors 2024-02-06 13:14:20 +08:00
Erik Demaine
2f6593959d
feat: esbuild support for addWatchFile and getWatchFiles (#345)
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2023-12-26 15:02:30 +01:00
Erik Demaine
670eb3799b
feat: esbuild config option to modify build options (#357) 2023-12-26 14:57:41 +01:00
Anthony Fu
e44d329173 chore: update deps 2023-12-26 14:56:58 +01:00
bohan
8bb9bb9821
fix: not include everything for rspack (#354) 2023-12-26 14:49:07 +01:00
Anthony Fu
59b3c3ec7d chore: update deps 2023-10-26 12:37:14 +09:00
beqa
a94366c294
feat(esbuild): added support for esbuild loader option (#337) 2023-09-18 01:26:01 +08:00
Quincy Qiu
127616da03
fix: add type export (#304) 2023-05-16 10:26:37 +02:00
三咲智子 Kevin Deng
166ef6f575
revert: "feat(webpack): use loader options, improve compactiblity with webpack 5 & rspack (#279)"
This reverts commit a8817bd992c8c65a603dcc43b33ebe78f9cd703c.
2023-03-14 22:53:09 +08:00
三咲智子 Kevin Deng
525f69b277
feat: experimental support for rspack (#285)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2023-03-11 12:24:52 +01:00
三咲智子 Kevin Deng
a8817bd992
feat(webpack): use loader options, improve compactiblity with webpack 5 & rspack (#279) 2023-03-10 14:17:59 +01:00
Anthony Fu
979c88fa77 fix: compact with new magic-string type 2023-02-15 11:38:15 +01:00
三咲智子 Kevin Deng
00830c3539
feat(esbuild): add plugin build context to meta (#226) 2022-12-12 09:52:24 +01:00
三咲智子 (Kevin)
20987e98f3
fix: internal TS type errors (#187)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2022-10-31 22:04:16 +08:00
三咲智子 (Kevin)
1b93bec3e5
chore: switch to @antfu/eslint-config (#184) 2022-10-31 21:57:36 +08:00
Anthony Fu
dc050408e7 feat(types): improve return types 2022-10-25 22:47:08 +08:00
Luca Forstner
160ec72e93
feat: add writeBundle hook (#179)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2022-10-22 19:11:24 +08:00
三咲智子 (Kevin)
d35e0552d0
feat: support nested plugins (#176)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2022-10-18 11:45:30 +08:00
Wang Zhi
95d2e4562b
fix(types): align source map with rollup (#161) 2022-08-25 23:58:01 +08:00
Anthony Fu
7482dc1fcd
feat: introduce new loadInclude hook (#157) 2022-08-21 22:08:38 +08:00
Anthony Fu
6df169f054 fix(types): transformInclude support nullish values 2022-08-15 11:42:07 +08:00
Anthony Fu
53954df7d0 fix(types): support required options 2022-08-15 11:19:06 +08:00
Luca Forstner
3b082edb47
feat: add isEntry flag to resolveId hook (#138)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2022-07-12 17:46:10 +08:00
Anthony Fu
8f5c6ad6a7 feat: support this.parse, close #90 2022-06-06 14:46:28 +08:00
Johnwesley R
3bfd523aee
feat: add context functions to more hooks, fix async hooks (#57)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2022-03-15 15:33:35 +08:00
Johnwesley R
544e66cd98
feat: add watch hook and context functions (#55) 2022-03-07 19:02:28 +08:00