代码拉取完成,页面将自动刷新
同步操作将从 antv/L7 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
import { defineConfig } from 'dumi';
import path from 'path';
const CopyPlugin = require("copy-webpack-plugin");
export default defineConfig({
title: 'L7 开发 Demo',
favicon: 'https://gw.alipayobjects.com/zos/antfincdn/FLrTNDvlna/antv.png',
logo: 'https://gw.alipayobjects.com/zos/antfincdn/FLrTNDvlna/antv.png',
outputPath: 'docs-dist',
base: '/',
define: {
'process.env.renderer': process.env.renderer?.replace(/\'/g, ''),
'process.env.CI': process.env.CI?.replace(/\'/g, ''),
},
devServer: {
port: '6006',
},
resolve: {
includes: ['dev-demos'],
excludes:['examples']
},
polyfill: {
imports: ['element-remove', 'babel-polyfill'],
},
targets: {
chrome: 58,
ie: 11,
},
mode: 'site',
navs: [
{
title: 'bugs',
path: '/bugs',
},
{
title: '特性',
path: '/features',
},
{
title: '图库',
path: '/gallery',
},
{
title: '瓦片',
path: '/tile',
},
{
title: '栅格',
path: '/raster',
},
{
title: '组件',
path: '/component',
},
{
title: '绘制组件',
path: '/draw',
},
{
title: 'WebGPU',
path: '/webgpu',
},
{
title: 'GitHub',
path: 'https://github.com/antvis/L7',
},
],
copy: [
{ from:'node_modules/@antv/g-device-api/dist/pkg/glsl_wgsl_compiler_bg.wasm', to: '[name].[ext]' },
],
esbuild: false,
chainWebpack: (memo, { env, webpack, createCSSRule }) => {
// 设置 alias
memo.module
.rule('lint')
.test(/\.(glsl|wgsl)$/)
.use('babel')
.loader('ts-shader-loader');
// 还可以创建具名use (loaders)
},
extraBabelPresets: ['@babel/preset-typescript'],
extraBabelIncludes: [
'@umijs/preset-dumi',
'split-on-first',
'query-string',
'strict-uri-encode',
'copy-text-to-clipboard',
],
extraBabelPlugins: [
['babel-plugin-inline-import', { extensions: ['.worker.js'] }],
],
externals: {
react: 'window.React',
'react-dom': 'window.ReactDOM',
antd: 'window.antd',
lodash: '_',
fetch: 'window.fetch',
},
styles: ['https://gw.alipayobjects.com/os/lib/antd/4.16.13/dist/antd.css'],
scripts: [
` window._AMapSecurityConfig = {
securityJsCode: "290ddc4b0d33be7bc9b354bc6a4ca614"
}`,
'https://webapi.amap.com/maps?v=2.0&key=6f025e700cbacbb0bb866712d20bb35c',
'https://gw.alipayobjects.com/os/lib/whatwg-fetch/3.6.2/dist/fetch.umd.js',
'https://gw.alipayobjects.com/os/lib/react/17.0.2/umd/react.profiling.min.js',
'https://gw.alipayobjects.com/os/lib/react-dom/17.0.2/umd/react-dom.profiling.min.js',
'https://gw.alipayobjects.com/os/lib/react/17.0.2/umd/react.production.min.js',
'https://gw.alipayobjects.com/os/lib/react-dom/17.0.2/umd/react-dom.production.min.js',
// 'https://gw.alipayobjects.com/os/lib/antd/4.16.13/dist/antd-with-locales.js',
'https://gw.alipayobjects.com/os/lib/antd/4.19.4/dist/antd.js',
'https://api.map.baidu.com/api?type=webgl&v=1.0&ak=zLhopYPPERGtpGOgimcdKcCimGRyyIsh',
// "https://api.map.baidu.com/api?v=1.0&&type=webgl&ak=zLhopYPPERGtpGOgimcdKcCimGRyyIsh",
/** lodash */
'https://gw.alipayobjects.com/os/lib/lodash/4.17.20/lodash.min.js',
],
publicPath: '/public/',
// more config: https://d.umijs.org/config
});
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。