Modular Build WinJS and react-winjs?
Closed this issue · 2 comments
joewood commented
It's very common for React based projects to use a commonjs build system, such as browserify or webpack. WinJS would be more efficient to adopt if it had a modular build system that supported commonjs out of the box. This would minimize the size cost of incorporating all of WinJS, when only one or two components use it. Also see winjs/winjs#571.
Some suggestions how this would work:
- Each React component defined in a separate file, using
defineControl
etc... - Each react-winjs component defined using commonjs and dependent only on the winjs modules that it uses
- Using webpack allows incorporation of CSS and will automatically convert AMD modules
- Using browserify would mean needing to use deamdify into the build to convert AMD->CommonJS
rigdern commented
That's a good idea. I will think more about this once I've exposed all of the controls.
rigdern commented
Moved to winjs/react-winjs#2.