boilerplate that shows how to use xlib, typescript, react, webpack together.
This mostly following instructions from http://www.typescriptlang.org/docs/handbook/react-&-webpack.html but using ts2 and types (not typings), and loading xlib, which is a library written in typescript.
- webpack works
- bundles and minifies
xlibto it's own file. - typescript source maps load properly
- works down to ie9
- typescript projects don't work via
npm linkso have to publish to @next for dev builds - webpack builtin modules don't play nicely with preloaders. this is fixed in the webpack.config.js file (see the
excludesections) - webpack doesn't like the
source-map-supportmodule thatxlibuses, so we no-op it (see themodule.loaderssection in the webpack.config.js)
- Node+NPM installed (tested with 6.x)
you can do a syntax check build via tsc commandline or visual studio.
we strongly suggest using Chrome for testing because the xlib.logging is designed with Chrome in mind.
Also, you can use the chrome LiveReload extension along with webpack --watch to easily simulate hot reloading.
- checkout this repo, and run ```npm
npm install --global typescript webpacknpm installwebpackfrom the commandline- open the
dist/index.htmlfile in a webbrowser (chrome suggested)