Building the Experimental API
Before we jump in to building the experimental API, we have to perform a bit of configuration for Nodejs.
npm install -g webpack
Once it is done installing, we have to add in two loaders that we need to make sure we can build the Orion source with JSON loading and NLS support.
The first loader is json-loader:
npm install json-loader
The second is amdi18n-loader:
npm install amdi18n-loader
That allows us to run the build, but now we have to make a small change to one of the loaders to make sure it can understand the shape of the NLS files used in Orion.
The changes will be made to the amdi18n-loader module.
navigate to your node_modules folder in the root of your user directory - for example /Users/currentuser/node_modules find the amdi18n-loader folder and open it up open the index.js file in there and copy / paste the code out of mrennie/amdi18n-loader into your local index.js now save and close the file.
Run a build
With everything done from the #Webpack Setup, lets run a build:
make sure the file webpack.config.js is in the directory (if not pull from the repo) run the following command for a simple build:
there should now be a built version of the tools in the folder
./built-js. The version built with the above command will produce an unminified, very large file (around 4.1MB). If we want to make it awesomer, run the following command:
webpack -p --progress
After the build completes, you should also see the source map in the