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 = { ...@@ -29,8 +29,8 @@ module.exports = {
// }, // },
ignoreMomentLocale: true, ignoreMomentLocale: true,
nodeModulesTransform: { nodeModulesTransform: {
type: 'none', type: 'all',
exclude: [''], // exclude: ['@wisdom-map/arcgismap', '@wisdom-map/arcgismap/lib/arcgisapi'],
}, },
proxy: proxy[REACT_APP_ENV || 'dev'], proxy: proxy[REACT_APP_ENV || 'dev'],
// openAPI: { // openAPI: {
...@@ -77,5 +77,5 @@ module.exports = { ...@@ -77,5 +77,5 @@ module.exports = {
}, },
javascriptEnabled: true javascriptEnabled: true
}, },
esbuild: {} // esbuild: {}
}; };
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
// }, // },
{ {
name: 'civ_water', name: 'civ_water',
entry: `//${window.location.hostname}:8082/civ_water`, entry: `//${window.location.hostname}:8084/civ_water`,
container: '#micro-container', container: '#micro-container',
activeRule: '/civbase/civ_water', activeRule: '/civbase/civ_water',
}, },
......
/* eslint-disable */ /* eslint-disable */
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin; // 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 = { module.exports = {
assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './', assetsRoot: process.env.NODE_ENV !== 'production' ? proxyURL : './',
dev: { dev: {
......
...@@ -26,20 +26,20 @@ module.exports = opts => { ...@@ -26,20 +26,20 @@ module.exports = opts => {
modules: false modules: false
}, },
], ],
opts.react && ['@babel/preset-react'], // opts.react && ['@babel/preset-react'],
opts.typescript && [ // opts.typescript && [
'@babel/preset-typescript', // '@babel/preset-typescript',
{ // {
allowNamespaces: true, // allowNamespaces: true,
}, // },
], // ],
].filter(Boolean), ].filter(Boolean),
plugins: [ plugins: [
['@babel/plugin-proposal-optional-chaining', { loose: false }], ['@babel/plugin-proposal-optional-chaining', { loose: false }],
['@babel/plugin-proposal-nullish-coalescing-operator', { loose: false }], ['@babel/plugin-proposal-nullish-coalescing-operator', { loose: false }],
'@babel/plugin-syntax-top-level-await', '@babel/plugin-syntax-top-level-await',
['@babel/plugin-transform-destructuring', { loose: false }], ['@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-decorators', { legacy: true }],
['@babel/plugin-proposal-class-properties', { loose: true }], ['@babel/plugin-proposal-class-properties', { loose: true }],
'@babel/plugin-transform-flow-strip-types', '@babel/plugin-transform-flow-strip-types',
......
...@@ -18,6 +18,7 @@ const TYPE_ALL_EXCLUDE = [ ...@@ -18,6 +18,7 @@ const TYPE_ALL_EXCLUDE = [
'lodash', 'lodash',
'react', 'react',
'react-dom', 'react-dom',
'@wisdom-map/arcgismap'
]; ];
......
const { deepmerge, createDebug, winPath, resolve } = require('@umijs/utils'); 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 terserOptions = require('./terserOptions');
const fs = require('fs'); const fs = require('fs');
const path = require('path'); const path = require('path');
...@@ -148,6 +148,8 @@ module.exports = options => { ...@@ -148,6 +148,8 @@ module.exports = options => {
type: 'csr', type: 'csr',
}); });
let presetOpts = getBabelPresetOpts({ let presetOpts = getBabelPresetOpts({
config: defineConfig, config: defineConfig,
env: process.env.NODE_ENV, env: process.env.NODE_ENV,
...@@ -195,7 +197,6 @@ module.exports = options => { ...@@ -195,7 +197,6 @@ module.exports = options => {
]).end() ]).end()
.exclude .exclude
.add(/node_modules/) .add(/node_modules/)
.add(/\.mfsu/)
.end() .end()
.use('babel-loader') .use('babel-loader')
.loader(require.resolve('@umijs/deps/compiled/babel-loader')) .loader(require.resolve('@umijs/deps/compiled/babel-loader'))
...@@ -630,19 +631,19 @@ module.exports = options => { ...@@ -630,19 +631,19 @@ module.exports = options => {
}); });
} }
if(defineConfig.esbuild) { // if(defineConfig.esbuild) {
const { target = 'es2015' } = defineConfig.esbuild || {}; // const { target = 'es2015' } = defineConfig.esbuild || {};
const optsMap = { // const optsMap = {
['csr']: { // ['csr']: {
minify: true, // minify: true,
target // target
} // }
}; // };
const opt = optsMap['csr']; // const opt = optsMap['csr'];
chainConfig.optimization.minimize = true; // chainConfig.optimization.minimize = true;
chainConfig.optimization.minimizer = [new ESBuildMinifyPlugin(opt)]; // // chainConfig.optimization.minimizer = [new ESBuildMinifyPlugin(opt)];
chainConfig.plugin('es-build').use(new ESBuildPlugin()) // // chainConfig.plugin('es-build').use(new ESBuildPlugin())
} // }
if (defineConfig.chainWebpack) { if (defineConfig.chainWebpack) {
defineConfig.chainWebpack(chainConfig, { defineConfig.chainWebpack(chainConfig, {
......
...@@ -40,15 +40,15 @@ module.exports = require('./webpack.base.babel')({ ...@@ -40,15 +40,15 @@ module.exports = require('./webpack.base.babel')({
minChunks: 2, minChunks: 2,
test: /[\\/]node_modules[\\/]/, test: /[\\/]node_modules[\\/]/,
}, },
styles: { // styles: {
// css统一打包到common.css文件中 // // css统一打包到common.css文件中
name: 'common', // name: 'common',
chunks: 'all', // chunks: 'all',
minChunks: 2, // minChunks: 2,
test: /\.(css|less|scss|stylus)$/, // test: /\.(css|less|scss|stylus)$/,
enforce: true, // enforce: true,
priority: 50, // 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