There are four webpack build processes. Output for all of them are in the dist directory. These builds run in parallel.

`package` - Builds the library itself for purposes of export. Other dependent libraries (such as finsemble-ui) can import from @finsemble/finsemble-core. `main.ts` is the entry point for this library.

`UMD` - Builds .js files for the FEA preload and the JavaScript adapter. These are UMD files that can be loaded in a browser.

`services` - Builds and assembles the "platform" including core services, config, and other random bits and pieces.

`files` - Builds a few other pieces of the platform and builds the jsx/tsx required for the UI for some of the services. (files and services should probably be consolidated).

The webpack processes use ts-loader to compile typescript. ts-loader is configured with the `onlyCompileBundledFiles` option so that it will *only* compile the typescript files that are part of the build path. Any .ts file that isn't needed for any of the four webpack processes will be skipped. This includes spec files. The webpack process also does not built the typedef declarations for library itself. These are built by running `yarn types`.

Note that webpack is not currently failing on TS error. This may be because we're using parallelization, or it may be because of this:
https://github.com/TypeStrong/ts-loader#failing-the-build-on-typescript-compilation-error

There are two typescript project files:

tsconfig.json - This is the main typescript file for the package. It is used for all four of the webpack processes. It is set to include only `src/**/*.ts` and `spec/**/*.ts`. This will allow VSC's typescript engine to show TS errors for any .ts file in either src or spec directories. It will also avoid tsc or vsc from checking the "/types" directory (which is bad because it had ambient declarations for the globals. In other words, don't go changing this to "**/*.ts"!).

tsconfig.types.json - This is the project file for creating typescript declaration files. This project inherits its base configuration from the main project (tsconfig.json) but them is set to emit only the declaration files. Types are built by running `yarn types`. Type declarations are broken out into a separate process in order to allow the mono-repo to be built in parallel. This includes *only* `src/main.ts` in order to (1) restrict the type declarations to just the code that is in the package (not all the services) and (2) to ensure that there aren't both "src" and "spec" files in the "/types" directory.

Out Typescript target is ES2017. This is because we need our JavaScript adapter to be compatible with major browsers and mocha testing to work on older Node versions.

Note: index.ts files are necessary for every subdirectory that is exported to types, even if blank. tsc will produce an obscure TS2688 error without them:
https://github.com/microsoft/TypeScript/issues/27956

Note: In webpack, we set `globalObject : "this"` in order that the UMD library generated by core is compatible with node. This is necessary to run it in node.js (such as in storybook mocha tests).
https://stackoverflow.com/questions/64639839/typescript-webpack-library-generates-referenceerror-self-is-not-defined