Skip to content

Commit dfb3559

Browse files
author
Savina Shen (Manpower Services Taiwan Co Ltd)
committed
Fix flowmap.gl sample build error
1 parent 7e48d95 commit dfb3559

6 files changed

Lines changed: 2147 additions & 2108 deletions

File tree

Samples/3D-layer/Flowmap.gl/Flowmap.gl.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<link href="https://atlas.microsoft.com/sdk/javascript/mapcontrol/3/atlas.min.css" rel="stylesheet" />
1717

1818
<!-- Add reference to the JavaScript file that integrates the Flowmap.gl module. -->
19-
<script type="module" crossorigin src="/3d-layer/flowmap.gl/build/index-6501962d.js"></script>
19+
<script type="module" crossorigin src="/3d-layer/flowmap.gl/dist/Flowmapgl.bundle.js"></script>
2020

2121
<style>
2222
.sidePanel {
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Flowmap.gl Sample
2+
3+
A simple setup to bundle the `src/flowmap.gl.js` source file with Vite.
4+
5+
## Prerequisites
6+
- [Node.js](https://nodejs.org/)
7+
- npm (Node Package Manager)
8+
9+
## Install
10+
```bash
11+
npm install
12+
````
13+
14+
## Build
15+
16+
Bundle only the source JS file and generate a fixed output name:
17+
18+
```bash
19+
npm run build
20+
```
21+
22+
The built file will be located at `dist/flowmap.bundle.js` and is imported in the `Flowmap.gl.html` file.
23+
24+
## Development / Test
25+
26+
Build the source JS file and start a local server to test the `Flowmap.gl.html` file.
27+
28+
29+
30+

Samples/3D-layer/Flowmap.gl/build/index-6501962d.js

Lines changed: 0 additions & 2104 deletions
This file was deleted.

Samples/3D-layer/Flowmap.gl/dist/Flowmapgl.bundle.js

Lines changed: 2104 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Samples/3D-layer/Flowmap.gl/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
"private": true,
66
"license": "MIT",
77
"scripts": {
8-
"dev": "vite",
9-
"build": "vite build",
10-
"preview": "vite preview"
8+
"build": "vite build"
119
},
1210
"dependencies": {
1311
"@deck.gl/core": "^8.9.28",
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { defineConfig } from 'vite'
2+
3+
export default defineConfig({
4+
build: {
5+
lib: {
6+
entry: 'src/Flowmap.gl.js',
7+
name: 'FlowmapGL',
8+
fileName: () => 'Flowmapgl.bundle.js'
9+
},
10+
},
11+
})

0 commit comments

Comments
 (0)