frame-gis-ts
v0.1.8
Published
## 1、cesium -需要下载依赖,并配置 webpack
Downloads
4
Readme
插件注意事项
1、cesium -需要下载依赖,并配置 webpack
下载依赖:
"cesium": "^1.110.1"
"copy-webpack-plugin": "^11.0.0"
"node-polyfill-webpack-plugin": "^2.0.1"
webpack 配置
/* cesium */
const CopyWebpackPlugin = require('copy-webpack-plugin');
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
const cesiumSource = 'node_modules/cesium/Source';
const cesiumWorkers = '../Build/Cesium/Workers';
const frameSource = 'node_modules/frame-gis-ts/Build';
new CopyWebpackPlugin({
patterns: [
{ from: path.join(cesiumSource, cesiumWorkers), to: 'Workers' },
{ from: path.join(cesiumSource, 'Assets'), to: 'Assets' },
{ from: path.join(cesiumSource, 'Widgets'), to: 'Widgets' },
{ from: path.join(frameSource, 'static'), to: 'frameStatic' },
]
}),
new NodePolyfillPlugin(),
new webpack.DefinePlugin({
// env.stringified,
CESIUM_BASE_URL: JSON.stringify(''),
}),