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
f3c706bd
Commit
f3c706bd
authored
Nov 17, 2021
by
邓晓峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: amap tip
parent
da471ac7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
86 deletions
+81
-86
civbase.zip
civbase.zip
+0
-0
config.js
config/config.js
+1
-1
proxy.js
config/proxy.js
+1
-1
webpack.prod.babel.js
internals/webpack/webpack.prod.babel.js
+79
-84
micro.js
src/micro.js
+0
-0
No files found.
civbase.zip
0 → 100644
View file @
f3c706bd
This diff was suppressed by a .gitattributes entry.
config/config.js
View file @
f3c706bd
...
...
@@ -30,7 +30,7 @@ module.exports = {
ignoreMomentLocale
:
true
,
nodeModulesTransform
:
{
type
:
'all'
,
//
exclude: ['@wisdom-map/arcgismap', '@wisdom-map/arcgismap/lib/arcgisapi'],
exclude
:
[
'@wisdom-map/arcgismap'
,
'@wisdom-map/arcgismap/lib/arcgisapi'
],
},
proxy
:
proxy
[
REACT_APP_ENV
||
'dev'
],
// openAPI: {
...
...
config/proxy.js
View file @
f3c706bd
/* eslint-disable */
// const proxyURL = process.env.NODE_ENV !== 'production' ? 'http://192.168.10.150:8777' : window.location.origin;
const
proxyURL
=
'http://
192.168.12.47:8081
'
;
const
proxyURL
=
'http://
61.150.107.92:8200
'
;
module
.
exports
=
{
assetsRoot
:
process
.
env
.
NODE_ENV
!==
'production'
?
proxyURL
:
'./'
,
dev
:
{
...
...
internals/webpack/webpack.prod.babel.js
View file @
f3c706bd
...
...
@@ -4,96 +4,91 @@ const { HashedModuleIdsPlugin } = require('webpack');
const
TerserPlugin
=
require
(
'terser-webpack-plugin'
);
const
CompressionPlugin
=
require
(
'compression-webpack-plugin'
);
module
.
exports
=
require
(
'./webpack.base.babel'
)({
mode
:
'production'
,
mode
:
'production'
,
// In production, we skip all hot-reloading stuff
entry
:
[
require
.
resolve
(
'react-app-polyfill/ie11'
),
path
.
join
(
process
.
cwd
(),
'src/app.js'
),
],
// In production, we skip all hot-reloading stuff
entry
:
[
require
.
resolve
(
'react-app-polyfill/ie11'
),
path
.
join
(
process
.
cwd
(),
'src/app.js'
),
],
// Utilize long-term caching by adding content hashes (not compilation hashes) to compiled assets
// output: {
// filename: '[name].[chunkhash].js',
// chunkFilename: '[name].[chunkhash].chunk.js',
// },
// Utilize long-term caching by adding content hashes (not compilation hashes) to compiled assets
// output: {
// filename: '[name].[chunkhash].js',
// chunkFilename: '[name].[chunkhash].chunk.js',
// },
optimization
:
{
minimize
:
true
,
minimizer
:
[
new
TerserPlugin
({
terserOptions
:
{
warnings
:
false
,
compress
:
{
comparisons
:
false
,
},
parse
:
{},
mangle
:
true
,
output
:
{
comments
:
false
,
ascii_only
:
true
,
},
},
parallel
:
true
,
cache
:
true
,
sourceMap
:
true
,
}),
],
nodeEnv
:
'production'
,
namedModules
:
true
,
usedExports
:
true
,
sideEffects
:
true
,
concatenateModules
:
true
,
runtimeChunk
:
'single'
,
splitChunks
:
{
cacheGroups
:
{
vendor
:
{
chunks
:
'all'
,
minSize
:
0
,
maxInitialRequests
:
35
,
test
:
/
[\\/]
node_modules
[\\/]
/
,
name
(
module
)
{
const
packageName
=
module
.
context
.
match
(
/
[\\/]
node_modules
[\\/](
.*
?)([\\/]
|$
)
/
,
)[
1
];
return
`npm.
${
packageName
.
replace
(
'@'
,
''
)}
`
;
},
optimization
:
{
minimize
:
true
,
minimizer
:
[
new
TerserPlugin
({
terserOptions
:
{
warnings
:
false
,
compress
:
{
comparisons
:
false
,
},
parse
:
{},
mangle
:
true
,
output
:
{
comments
:
false
,
ascii_only
:
true
,
},
},
parallel
:
true
,
cache
:
true
,
sourceMap
:
true
,
}),
],
nodeEnv
:
'production'
,
sideEffects
:
true
,
concatenateModules
:
true
,
runtimeChunk
:
'single'
,
splitChunks
:
{
// minSize: 0,
maxSize
:
100
*
1024
,
// 控制包的最大字节数
minSize
:
10
*
1024
,
// 控制包的最小字节数
minChunks
:
1
,
cacheGroups
:
{
vendor
:
{
chunks
:
'all'
,
maxInitialRequests
:
10
,
minSize
:
0
,
test
:
/
[\\/]
node_modules
[\\/]
/
,
name
(
module
)
{
const
packageName
=
module
.
context
.
match
(
/
[\\/]
node_modules
[\\/](
.*
?)([\\/]
|$
)
/
,
)[
1
];
return
`npm.
${
packageName
.
replace
(
'@'
,
''
)}
`
;
},
},
bizComponent
:
{
chunks
:
'all'
,
minSize
:
0
,
maxInitialRequests
:
10
,
test
:
/
[\\/]
src
[\\/]
components
[\\/]
/
,
name
:
'biz-component'
,
},
},
},
bizComponent
:
{
chunks
:
'all'
,
minSize
:
0
,
maxInitialRequests
:
10
,
test
:
/
[\\/]
src
[\\/]
components
[\\/]
/
,
name
:
'biz-component'
,
},
react
:
{
chunks
:
'all'
,
minSize
:
0
,
maxInitialRequests
:
10
,
test
:
/
[\\/]
node_modules
[\\/]
react-dom
[\\/]
/
,
name
:
'react-dom'
,
}
},
},
},
plugins
:
[
new
CompressionPlugin
({
algorithm
:
'gzip'
,
test
:
/
\.
js$|
\.
css$|
\.
html$/
,
threshold
:
10240
,
minRatio
:
0.8
,
}),
plugins
:
[
new
CompressionPlugin
({
algorithm
:
'gzip'
,
test
:
/
\.
js$|
\.
css$|
\.
html$/
,
threshold
:
10240
,
minRatio
:
0.8
,
}),
new
HashedModuleIdsPlugin
({
hashFunction
:
'sha256'
,
hashDigest
:
'hex'
,
hashDigestLength
:
20
,
}),
],
new
HashedModuleIdsPlugin
({
hashFunction
:
'sha256'
,
hashDigest
:
'hex'
,
hashDigestLength
:
20
,
}),
],
performance
:
{
assetFilter
:
assetFilename
=>
!
/
(\.
map$
)
|
(
^
(
main
\.
|favicon
\.))
/
.
test
(
assetFilename
),
},
performance
:
{
assetFilter
:
assetFilename
=>
!
/
(\.
map$
)
|
(
^
(
main
\.
|favicon
\.))
/
.
test
(
assetFilename
),
},
});
src/micro.js
View file @
f3c706bd
This diff is collapsed.
Click to expand it.
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