Fluentui: Create standalone fabric-react package to be used in a codepen.

Created on 7 Sep 2016  ·  4Comments  ·  Source: microsoft/fluentui

Could we provide a build of Fabric React that can be used directly in a simple app, without any NPM dependencies, build process, etc? I'm anticipating that we'll get questions like this from developers who are working on simple add-ins and want to just drop a reference in and start using it.

Question ❔

Most helpful comment

This is now complete. I've adjusted the bundle to export Fabric variable, so that you can make codepens like this one:

http://codepen.io/dzearing/pen/EgqMZq?editors=0110

All 4 comments

I think this is just bundling work. It wouldn't be difficult to export all the stuff in a global namespace so that we can just load from cdn in a codepen.

The webpack.lib.config is already configured for library output but it doesn't work (ReactFabric isn't globally available for whatever). The externals declaration is also kinda weird (declaring itself as an external dependency?)

Anyway, this is the config that i used for my lib which should work if you add the typescript loader stuff. It also extracts the css module stuff in a seperate stylesheet.

I can try to get this working if you want

That would be very helpful, @kmees!

This is now complete. I've adjusted the bundle to export Fabric variable, so that you can make codepens like this one:

http://codepen.io/dzearing/pen/EgqMZq?editors=0110

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carruthe picture carruthe  ·  3Comments

holysnake91 picture holysnake91  ·  3Comments

prashkan picture prashkan  ·  3Comments

carruthe picture carruthe  ·  3Comments

justinwilaby picture justinwilaby  ·  3Comments