vite-plugin-rescript icon indicating copy to clipboard operation
vite-plugin-rescript copied to clipboard

support rewatch

Open tx46 opened this issue 5 months ago • 5 comments

now that rescript has switched to rewatch, this stopped working for me.

[@jihchi/vite-plugin-rescript] error: unexpected argument '-w' found

  tip: to pass '-w' as a value, use '-- -w'

Usage: rescript.exe build [OPTIONS] [FOLDER]

For more information, try '--help'.
ExecaError: Command failed with exit code 2: rescript build -with-deps -w

error: unexpected argument '-w' found

  tip: to pass '-w' as a value, use '-- -w'

Usage: rescript.exe build [OPTIONS] [FOLDER]

For more information, try '--help'.

tx46 avatar Jul 14 '25 01:07 tx46

Hi @tx46. What version of ReScript were you using? ReScript 12 beta?

jihchi avatar Jul 14 '25 06:07 jihchi

Hi @tx46. What version of ReScript were you using? ReScript 12 beta?

yes, the latest one, beta1.

tx46 avatar Jul 15 '25 10:07 tx46

Should be rescript watch in the latest beta.

nojaf avatar Jul 16 '25 12:07 nojaf

fyi, rewatch hangs in the background (but tests work)

close timed out after 10000ms
Tests closed successfully but something prevents Vite server from exiting
You can try to identify the cause by enabling "hanging-process" reporter. See https://vitest.dev/config/#reporters

tx46 avatar Sep 18 '25 23:09 tx46

also, it should probably run build with --dev for tests i think

tx46 avatar Sep 18 '25 23:09 tx46