msgraph-sdk-javascript icon indicating copy to clipboard operation
msgraph-sdk-javascript copied to clipboard

Simplify using the Graph JS SDK as ESM in the browser

Open waldekmastykarz opened this issue 1 year ago • 3 comments

Since modern browsers support ESM these days, we should consider improving the developer experience of using the Graph JS SDK as ESM in their client-side apps. The biggest benefit of using ESM is increased modularity of the app (not polluting the global namespace) and a modern programming style that's closer to TypeScript and server-side JavaScript.

The main struggle with using the Graph JS SDK as ESM right now, are references to tslib and other modules, that require using importmaps. I've put together an example that shows a minimal app based on ESM. It would be helpful if we could simplify the developer experience around ESM in the browser.

waldekmastykarz avatar Sep 21 '22 08:09 waldekmastykarz

Definitely for our future version of the SDK. I would make sure we have a fully working ESM version with v4.0 when available!

sebastienlevert avatar Sep 27 '22 22:09 sebastienlevert

@waldekmastykarz can you please provide a sample snippet of a simplified developer experience?

nikithauc avatar Sep 28 '22 00:09 nikithauc

@nikithauc please see the link I included in message earlier for a minimal working app.

waldekmastykarz avatar Sep 28 '22 11:09 waldekmastykarz