Commit c3c9997d authored by 邓晓峰's avatar 邓晓峰

feat: 集成ArcgisMap

parent f81817bb
export default {
mode: 'site',
title: '集中式基座',
dynamicImport: {},
manifest: {},
hash: true,
resolve: {
includes: ['docs'],
},
styles: [
`a[title='站长统计'] { display: none; }`,
],
menus: {
'/guide': [
{
title: '介绍',
children: ['guide/index', 'guide/getting-started', 'guide/command'],
},
],
},
navs: [
null,
{ title: 'GitHub', path: 'https://g.civnet.cn:8443/test/maintenance.git' },
{ title: '更新日志', path: 'https://g.civnet.cn:8443/test/maintenance/blob/master/CHANGELOG.md' },
],
headScripts: [
'https://v1.cnzz.com/z_stat.php?id=1278602214&web_id=1278602214'
],
}
......@@ -29,8 +29,8 @@ module.exports = {
// },
ignoreMomentLocale: true,
nodeModulesTransform: {
type: 'none',
exclude: [''],
type: 'all',
// exclude: ['@wisdom-map/arcgismap', '@wisdom-map/arcgismap/lib/arcgisapi'],
},
proxy: proxy[REACT_APP_ENV || 'dev'],
// openAPI: {
......@@ -77,5 +77,5 @@ module.exports = {
},
javascriptEnabled: true
},
esbuild: {}
// esbuild: {}
};
......@@ -11,7 +11,7 @@ export default {
// },
{
name: 'civ_water',
entry: `//${window.location.hostname}:8082/civ_water`,
entry: `//${window.location.hostname}:8084/civ_water`,
container: '#micro-container',
activeRule: '/civbase/civ_water',
},
......
/* eslint-disable */
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin;
const proxyURL = 'http://192.168.12.69:8082';
const proxyURL = 'http://192.168.12.47:8081';
module.exports = {
assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './',
dev: {
......
......@@ -26,20 +26,20 @@ module.exports = opts => {
modules: false
},
],
opts.react && ['@babel/preset-react'],
opts.typescript && [
'@babel/preset-typescript',
{
allowNamespaces: true,
},
],
// opts.react && ['@babel/preset-react'],
// opts.typescript && [
// '@babel/preset-typescript',
// {
// allowNamespaces: true,
// },
// ],
].filter(Boolean),
plugins: [
['@babel/plugin-proposal-optional-chaining', { loose: false }],
['@babel/plugin-proposal-nullish-coalescing-operator', { loose: false }],
'@babel/plugin-syntax-top-level-await',
['@babel/plugin-transform-destructuring', { loose: false }],
opts.typescript && ['babel-plugin-transform-typescript-metadata'],
// opts.typescript && ['babel-plugin-transform-typescript-metadata'],
['@babel/plugin-proposal-decorators', { legacy: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
'@babel/plugin-transform-flow-strip-types',
......
......@@ -18,6 +18,7 @@ const TYPE_ALL_EXCLUDE = [
'lodash',
'react',
'react-dom',
'@wisdom-map/arcgismap'
];
......
const { deepmerge, createDebug, winPath, resolve } = require('@umijs/utils');
const { ESBuildPlugin, ESBuildMinifyPlugin } = require('esbuild-loader');
// const { ESBuildPlugin, ESBuildMinifyPlugin } = require('esbuild-loader');
const terserOptions = require('./terserOptions');
const fs = require('fs');
const path = require('path');
......@@ -148,6 +148,8 @@ module.exports = options => {
type: 'csr',
});
let presetOpts = getBabelPresetOpts({
config: defineConfig,
env: process.env.NODE_ENV,
......@@ -195,7 +197,6 @@ module.exports = options => {
]).end()
.exclude
.add(/node_modules/)
.add(/\.mfsu/)
.end()
.use('babel-loader')
.loader(require.resolve('@umijs/deps/compiled/babel-loader'))
......@@ -630,19 +631,19 @@ module.exports = options => {
});
}
if(defineConfig.esbuild) {
const { target = 'es2015' } = defineConfig.esbuild || {};
const optsMap = {
['csr']: {
minify: true,
target
}
};
const opt = optsMap['csr'];
chainConfig.optimization.minimize = true;
chainConfig.optimization.minimizer = [new ESBuildMinifyPlugin(opt)];
chainConfig.plugin('es-build').use(new ESBuildPlugin())
}
// if(defineConfig.esbuild) {
// const { target = 'es2015' } = defineConfig.esbuild || {};
// const optsMap = {
// ['csr']: {
// minify: true,
// target
// }
// };
// const opt = optsMap['csr'];
// chainConfig.optimization.minimize = true;
// // chainConfig.optimization.minimizer = [new ESBuildMinifyPlugin(opt)];
// // chainConfig.plugin('es-build').use(new ESBuildPlugin())
// }
if (defineConfig.chainWebpack) {
defineConfig.chainWebpack(chainConfig, {
......
......@@ -40,15 +40,15 @@ module.exports = require('./webpack.base.babel')({
minChunks: 2,
test: /[\\/]node_modules[\\/]/,
},
styles: {
// css统一打包到common.css文件中
name: 'common',
chunks: 'all',
minChunks: 2,
test: /\.(css|less|scss|stylus)$/,
enforce: true,
priority: 50,
},
// styles: {
// // css统一打包到common.css文件中
// name: 'common',
// chunks: 'all',
// minChunks: 2,
// test: /\.(css|less|scss|stylus)$/,
// enforce: true,
// priority: 50,
// },
},
},
},
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment