-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- arcgis [email protected] | ||
|
||
|
||
|
||
|
@@ -43,7 +44,7 @@ window['CESIUM_BASE_URL'] = `path/to/cesium/Source/` | |
|
||
## ④ arcgis 注意 | ||
|
||
详细的文档写在子目录中了。 | ||
详细的文档写在子目录中了,主要是 `assets` 目录的预复制操作,这点和 Cesium 的操作略像。读者可以自己手动试试将 `esriConfig.assetsPath` 配为部署好的地址,也可以像我 Cesium 例子一样设置开发时的目录,即 `esriConfig.assetsPath = "http://localhost:3000/node_modules/@arcgis/core/assets/"` (我没测试过,留给读者自己试吧)。 | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# 简介 | ||
|
||
使用 vite2 运行 `@arcgis/core` 项目。目前使用 react17 框架。 | ||
|
||
|
||
|
||
# 运行方式 | ||
|
||
## 预备工作 | ||
|
||
### ① 手动复制 `node_modules/@arcgis/core/assets` 文件夹 | ||
|
||
将此文件夹完整地复制到 `public` 目录下即可 | ||
|
||
### ② 先运行一次 `yarn build` 或 `npm run build` | ||
|
||
这样,rollup 的 copy 插件会复制 ① 中所提的 `assets` 文件夹到 `public` 目录,可以省去手动复制。 | ||
|
||
|
||
|
||
|
||
|
||
## 启动开发 | ||
|
||
``` sh | ||
yarn dev | ||
``` | ||
|
||
|
||
|
||
## 生产编译 | ||
|
||
``` sh | ||
yarn build | ||
``` | ||
|
||
|
||
|
||
## 编译后预览(启动本地服务器) | ||
|
||
``` sh | ||
yarn serve | ||
``` | ||
|