Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivWeb
Commits
c3c9997d
Commit
c3c9997d
authored
Oct 26, 2021
by
邓晓峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 集成ArcgisMap
parent
f81817bb
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
39 additions
and
66 deletions
+39
-66
.umirc.js
.umirc.js
+0
-29
config.js
config/config.js
+3
-3
micor.js
config/micor.js
+1
-1
proxy.js
config/proxy.js
+1
-1
index.js
internals/webpack/babel-preset/index.js
+8
-8
nodeModulesTransform.js
internals/webpack/nodeModulesTransform.js
+1
-0
webpack.base.babel.js
internals/webpack/webpack.base.babel.js
+16
-15
webpack.dev.babel.js
internals/webpack/webpack.dev.babel.js
+9
-9
No file name available
+0
-0
No files found.
.umirc.js
deleted
100644 → 0
View file @
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'
],
}
config/config.js
View file @
c3c9997d
...
...
@@ -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: {}
};
config/micor.js
View file @
c3c9997d
...
...
@@ -11,7 +11,7 @@ export default {
// },
{
name
:
'civ_water'
,
entry
:
`//
${
window
.
location
.
hostname
}
:808
2
/civ_water`
,
entry
:
`//
${
window
.
location
.
hostname
}
:808
4
/civ_water`
,
container
:
'#micro-container'
,
activeRule
:
'/civbase/civ_water'
,
},
...
...
config/proxy.js
View file @
c3c9997d
/* 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
:
{
...
...
internals/webpack/babel-preset/index.js
View file @
c3c9997d
...
...
@@ -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'
,
...
...
internals/webpack/nodeModulesTransform.js
View file @
c3c9997d
...
...
@@ -18,6 +18,7 @@ const TYPE_ALL_EXCLUDE = [
'lodash'
,
'react'
,
'react-dom'
,
'@wisdom-map/arcgismap'
];
...
...
internals/webpack/webpack.base.babel.js
View file @
c3c9997d
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
,
{
...
...
internals/webpack/webpack.dev.babel.js
View file @
c3c9997d
...
...
@@ -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,
//
},
},
},
},
...
...
View file @
c3c9997d
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment