Use ESBuild for frontend build.

Replacing webpack by ESBuild for client code compilation (as in the
official quickstart plugin).

So we can remove deprecated webpack dependencies.

Note: webpack is still used for ConverseJS build.
This may be removed soon.

Related to issue #122.
This commit is contained in:
John Livingston
2022-12-07 18:36:16 +01:00
parent 901d1e96ab
commit c178213e19
14 changed files with 677 additions and 7760 deletions

View File

@ -81,3 +81,11 @@ You can build the plugin with extra debug features simply by using:
```bash
NODE_ENV=dev npm run build
```
### ESBuild vs Typescript
This plugin uses ESBuild for frontend code generation, as the official `peertube-plugin-quickstart` plugin.
ESBuild can handle Typescript, but does not check types
(see [ESBuild documentation](https://esbuild.github.io/content-types/#typescript)).
That's why we first comple typescript with the `-noEmit` option, just to check types (`check:client:ts` in package.json file).
Then, if everything is okay, we run ESBuild to generate the compiled javascript.