-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move to esbuild #79
Move to esbuild #79
Conversation
2bb70ec
to
6b44ebb
Compare
6b44ebb
to
bca9773
Compare
bca9773
to
343a8f8
Compare
@havardholvik got the full embed bundle working, I think we're good to go now |
343a8f8
to
38a70b2
Compare
Nice! Im doing some review and testing now, will be done shortly |
38a70b2
to
583dddd
Compare
roomUrl: string, | ||
roomConnectionOptions: UseRoomConnectionOptions | ||
): RoomConnectionRef { | ||
export function useRoomConnection(roomUrl: string, roomConnectionOptions: UseRoomConnectionOptions): RoomConnectionRef { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This default export was causing webpack build errors when importing into a Create React App app.
07f72d2
to
60577be
Compare
60577be
to
f3bbd6a
Compare
The react build isn't isolated because for some reason even though the entry point for that builds is specified as |
esbuild doesn't support generating type declarations like rollup doesn This is a little problematic, as now we have a separate build step that tells tsc to generate our types. tsc doesn't support generating a single index.d.ts file for es6 modules, so we emit our directory structure.
f3bbd6a
to
106772b
Compare
Description
We are having some funny module resolution problems with rollup, so this pr aims to replace it with esbuild
Adds build steps for individual react/embed builds as well
Gotchas
Esbuild can't emit typescript declarations, so we have to do it with
tsc
Unfortunately, tsc can't generate es6 concatenated declarations so we include the full directory structure... is this a problem?
To Test
yarn
to install the stuffyarn build
to generate the builds and typesScreenshots
Here's me importing just the react bundle like
import { useRoomConnection } from "@whereby.com/browser-sdk/react"
and using the embed bundle in a script tag like
<script type="module" src="./node_modules/@whereby.com/browser-sdk/dist/embed/index.esm.js"></script>