preact-island-plugins
preact-island-plugins copied to clipboard
feat: reduce handling of typescript in this plugin
The initial reason for adding a typescript plugin internally was to allow users to provide a tsconfig for the server and one for the client since the client build is handled by the plugin.
Over different typescript configurations I realised that a lot of configurations end up causing the client build to be invalid because of the config being server focused and the expectation that the plugin would just handle it for the client which wasn't the intention of the tsconfig fields and also wasn't documented (so mostly my fault)
The other part is that the client build in most cases would end up needing the same kind of configuration so it's easier to just have it use the same config for each client build and so this PR removes the dependency on rollup/plugin-typescript and uses esbuild to handle normalisation of the AST and the also the client side builds.