Building a TypeScript website using the ArcGIS Javascript API

73
1
Jump to solution
a week ago
Highlighted
MVP Regular Contributor

I am starting a new GIS website that will be using the ArcGIS Javascript API.  We will be using TypeScript for the majority of the site development.  The project will also contain several custom widgets as well as customized default widgets.  

So far I have been able to get the test site to build using tsc installed with Typescript.  This results in many generated JavaScript files for the main site and related custom widgets  The second approach has been using webpack to build the app.  This is great except I do not really want to bundle the entire ArcGIS Javascript API and related CSS to host on our system. 

Is there something in between, without adding in a framework such as React or Angular?  My pea sized brain is already on overload.  I am looking for something to package our custom js/ts code and css/scss to be used in conjunction with the ArcGIS JavaScript API CDN

The two approaches we used are loosely based upon @ReneRubalcava's demos posted on github noted below:

https://github.com/Esri/jsapi-resources/tree/master/4.x/webpack/demo

https://github.com/Esri/jsapi-resources/tree/master/4.x/typescript/demo

 

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Frequent Contributor

You can check out this template app, it uses rollup to bundle your code and uses the CDN.

https://github.com/Esri/arcgis-js-cli/tree/master/templates/basic-cdn/app

 

View solution in original post

Reply
0 Kudos
1 Reply
Highlighted
Frequent Contributor

You can check out this template app, it uses rollup to bundle your code and uses the CDN.

https://github.com/Esri/arcgis-js-cli/tree/master/templates/basic-cdn/app

 

View solution in original post

Reply
0 Kudos