Skip to content

Commit

Permalink
chore(vite): replace vite-ts sample with vanilla JS (#529)
Browse files Browse the repository at this point in the history
* chore(vite): replace vite-ts sample with vanilla JS vite

* Bump Vite version

* Add favicon shortcut

* ci: add zip files

* ci: analyze core esm sample builds

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
andygup and github-actions[bot] authored Aug 14, 2024
1 parent d4200bd commit 80adb84
Show file tree
Hide file tree
Showing 46 changed files with 29 additions and 42 deletions.
12 changes: 6 additions & 6 deletions core-samples/.metrics/4.30.0.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Sample,Build size (MB),Build file count,Main bundle file,Main bundle size (MB),Main bundle gzipped size (MB),Main bundle brotli compressed size (MB),Load time (ms),Total runtime (ms),Loaded size (MB),Total JS requests,Total JS size (MB),Total HTTP requests,JS heap size (MB)
esbuild 0.21.4,8.81,741,index.js,0.28,0.07,0.06,5939,19350,5.29,412,3.70,514,28.86
Angular 18.0.0,9.07,743,chunk-YBOAW74C.js,0.67,0.20,0.17,6205,19237,5.53,413,3.91,518,37.39
React 18.3.1,8.62,455,index-DOxvg1k6.js,1.49,0.42,0.34,5446,18866,5.39,173,3.79,277,25.23
Vue 3.4.27,8.53,455,index-DLhlUJ_R.js,1.41,0.40,0.33,5919,18931,5.30,173,3.71,274,27.86
Rollup 4.18.0,8.32,454,main.js,1.31,0.36,0.29,5589,19010,5.16,173,3.55,276,31.37
Webpack 5.91.0,10.00,308,index.js,1.43,0.39,0.31,5770,19163,5.67,72,4.07,176,30.54
esbuild 0.21.4,8.82,742,index.js,0.28,0.07,0.06,6476,19923,5.31,413,3.71,517,26.79
Angular 18.0.0,9.09,744,chunk-5FWIIEIX.js,0.67,0.20,0.17,6566,20093,5.54,414,3.92,518,27.02
React 18.3.1,8.63,455,index-B7T79Qu8.js,1.49,0.42,0.35,6029,19434,5.40,173,3.80,278,22.57
Vue 3.4.27,8.54,455,index-CSsgr1EI.js,1.41,0.40,0.33,6296,19302,5.32,173,3.71,277,28.27
Rollup 4.18.0,8.33,454,main.js,1.31,0.36,0.29,5962,19378,5.17,173,3.56,276,26.87
Webpack 5.91.0,10.01,308,index.js,1.43,0.39,0.31,6825,19841,5.68,72,4.08,176,27.12
2 changes: 1 addition & 1 deletion core-samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You can use these links to download individual samples:
* [React/Vite](https://esri.github.io/jsapi-resources/zips/core-sample-jsapi-react.zip)
* [Rollup.js (no framework)](https://esri.github.io/jsapi-resources/zips/core-sample-rollup.zip)
* [Vue.js/Vite](https://esri.github.io/jsapi-resources/zips/core-sample-jsapi-vue.zip)
* [Vite/TypeScript](https://esri.github.io/jsapi-resources/zips/core-sample-jsapi-vite-ts.zip)
* [Vite](https://esri.github.io/jsapi-resources/zips/core-sample-jsapi-vite.zip)
* [Webpack (no framework)](https://esri.github.io/jsapi-resources/zips/core-sample-webpack.zip)

## Get Started
Expand Down
1 change: 0 additions & 1 deletion core-samples/jsapi-vite-ts/public/vite.svg

This file was deleted.

23 changes: 0 additions & 23 deletions core-samples/jsapi-vite-ts/tsconfig.json

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# ArcGIS Maps SDK for JavaScript with Vite and TypeScript
# ArcGIS Maps SDK for JavaScript with Vite

This sample demonstrates how to use [@arcgis/core](https://www.npmjs.com/package/@arcgis/core) ES modules with [Vite](https://vitejs.dev/).
This sample demonstrates how to use [@arcgis/core](https://www.npmjs.com/package/@arcgis/core) ES modules with [Vite](https://vitejs.dev/) without a framework.

## Get Started

📁 **[Click here to download this directory as a ZIP file](https://esri.github.io/jsapi-resources/zips/core-sample-jsapi-vite-ts.zip)** 📁
📁 **[Click here to download this directory as a ZIP file](https://esri.github.io/jsapi-resources/zips/core-sample-jsapi-vite.zip)** 📁

Run `npm install` and then start adding modules.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" href="data:;base64,=" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ArcGIS JS API - Vite + TS</title>
<title>ArcGIS JS API - Vite</title>
</head>
<body>
<div id="viewDiv"></div>
<script type="module" src="/src/main.ts"></script>
<script type="module" src="/src/main.js"></script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
"name": "jsapi-vite-ts",
"name": "jsapi-vite",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
"typescript": "^5.4.5",
"vite": "^5.2.12"
"vite": "^5.4.0"
},
"dependencies": {
"@arcgis/core": "~4.30.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const webmap = new WebMap({
});

const view = new MapView({
container:"viewDiv",
container: "viewDiv",
map: webmap
});

Expand Down
File renamed without changes.
12 changes: 12 additions & 0 deletions core-samples/jsapi-vite/vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from "vite";

const config = {
build: {
chunkSizeWarningLimit: 1500
},
server: {
open: true
}
};

export default defineConfig(config);
Binary file modified zips/charts-components-sample-angular.zip
Binary file not shown.
Binary file modified zips/charts-components-sample-cdn.zip
Binary file not shown.
Binary file modified zips/charts-components-sample-react.zip
Binary file not shown.
Binary file modified zips/charts-components-sample-vite.zip
Binary file not shown.
Binary file modified zips/charts-components-sample-vue.zip
Binary file not shown.
Binary file modified zips/charts-components-sample-webpack.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified zips/coding-components-sample-angular.zip
Binary file not shown.
Binary file modified zips/coding-components-sample-cdn.zip
Binary file not shown.
Binary file modified zips/coding-components-sample-react.zip
Binary file not shown.
Binary file modified zips/coding-components-sample-vite.zip
Binary file not shown.
Binary file modified zips/coding-components-sample-vue.zip
Binary file not shown.
Binary file modified zips/coding-components-sample-webpack.zip
Binary file not shown.
Binary file modified zips/core-sample-esbuild.zip
Binary file not shown.
Binary file modified zips/core-sample-jsapi-angular-cli.zip
Binary file not shown.
Binary file modified zips/core-sample-jsapi-custom-ui.zip
Binary file not shown.
Binary file modified zips/core-sample-jsapi-custom-workers.zip
Binary file not shown.
Binary file modified zips/core-sample-jsapi-deno.zip
Binary file not shown.
Binary file modified zips/core-sample-jsapi-esm-cdn.zip
Binary file not shown.
Binary file modified zips/core-sample-jsapi-node.zip
Binary file not shown.
Binary file modified zips/core-sample-jsapi-oauth.zip
Binary file not shown.
Binary file modified zips/core-sample-jsapi-react.zip
Binary file not shown.
Binary file added zips/core-sample-jsapi-vite.zip
Binary file not shown.
Binary file modified zips/core-sample-jsapi-vue.zip
Binary file not shown.
Binary file modified zips/core-sample-rollup.zip
Binary file not shown.
Binary file modified zips/core-sample-webpack.zip
Binary file not shown.
Binary file modified zips/map-component-sample-angular.zip
Binary file not shown.
Binary file modified zips/map-component-sample-cdn.zip
Binary file not shown.
Binary file modified zips/map-component-sample-react.zip
Binary file not shown.
Binary file modified zips/map-component-sample-vite.zip
Binary file not shown.
Binary file modified zips/map-component-sample-vue.zip
Binary file not shown.
Binary file modified zips/map-component-sample-webpack.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 80adb84

Please sign in to comment.