Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
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
黄庭坚
jinfa-platform
Commits
5339eb45
Commit
5339eb45
authored
Nov 29, 2021
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 开启mfsu, 强化构建, 使用babel-import处理lodash
parent
d68a1ee5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
14 deletions
+69
-14
config.local.ts
config/config.local.ts
+47
-0
config.prod.ts
config/config.prod.ts
+4
-8
config.ts
config/config.ts
+11
-2
index.ts
config/routes/index.ts
+2
-2
package.json
package.json
+4
-1
index.tsx
...on/saleOrder/agentOrder/components/addressModal/index.tsx
+1
-1
No files found.
config/config.local.ts
0 → 100644
View file @
5339eb45
import
{
defineConfig
}
from
'umi'
;
import
ExternalsAntd
from
'./utils/external-antd'
;
import
AntdDayjsWebpackPlugin
from
'antd-dayjs-webpack-plugin'
// import LodashModuleReplacementPlugin from 'lodash-webpack-plugin'
export
default
defineConfig
({
devtool
:
false
,
externals
:
{
"react"
:
'React'
,
"react-dom"
:
'ReactDOM'
,
"@antv/g2"
:
'G2'
,
"@antv/data-set"
:
'DataSet'
,
bizcharts
:
'BizCharts'
,
"lingxi-design-ui"
:
'LingXiUI'
,
// "@formily/antd-components": 'FormilyComponent',
"@lingxi-design/ui"
:
'LingxiDesignUI'
,
// 对antd的组件做一个远程映射
...
ExternalsAntd
},
scripts
:
[
'http://lingxi-frontend-prod.oss-cn-hangzhou.aliyuncs.com/static/js/react.production.min.js'
,
'http://lingxi-frontend-prod.oss-cn-hangzhou.aliyuncs.com/static/js/react-dom.production.min.js'
,
'http://lingxi-frontend-prod.oss-cn-hangzhou.aliyuncs.com/static/js/g2.min.js'
,
'http://lingxi-frontend-prod.oss-cn-hangzhou.aliyuncs.com/static/js/data-set.js'
,
'http://lingxi-frontend-prod.oss-cn-hangzhou.aliyuncs.com/static/js/BizCharts.min.js'
,
'http://lingxi-frontend-prod.oss-cn-hangzhou.aliyuncs.com/static/js/LingXiUI.min.js'
,
'http://lingxi-frontend-prod.oss-cn-hangzhou.aliyuncs.com/static/js/antd.min.js'
,
// 'http://lingxi-frontend-prod.oss-cn-hangzhou.aliyuncs.com/static/js/formily-component.min.js',
'http://lingxi-frontend-prod.oss-cn-hangzhou.aliyuncs.com/static/js/lingxi-design-ui.min.js'
,
],
chainWebpack
(
config
)
{
config
.
plugin
(
'antd-dayjs-webpack-plugin'
).
use
(
AntdDayjsWebpackPlugin
)
// config.plugin('lodash-webpack-plugin').use(LodashModuleReplacementPlugin)
config
.
module
.
rule
(
'svg'
)
.
exclude
.
add
(
/pages/
)
.
end
();
// 给内置的添加 exclude,这里根据自己的情况处理
config
.
module
.
rule
(
'svgr'
)
.
test
(
/.svg$/
)
.
include
.
add
(
/pages/
)
.
end
()
// include 指定需要直接 svgr 的情况
.
use
(
'@svgr/webpack'
)
.
loader
(
require
.
resolve
(
'@svgr/webpack'
));
}
})
config/config.prod.ts
View file @
5339eb45
...
...
@@ -11,7 +11,8 @@ export default defineConfig({
"@antv/data-set"
:
'DataSet'
,
bizcharts
:
'BizCharts'
,
"lingxi-design-ui"
:
'LingXiUI'
,
"@formily/antd-components"
:
'FormilyComponent'
,
// "@formily/antd-components": 'FormilyComponent',
"@lingxi-design/ui"
:
'LingxiDesignUI'
,
// 对antd的组件做一个远程映射
...
ExternalsAntd
},
...
...
@@ -23,13 +24,8 @@ export default defineConfig({
'http://lingxi-frontend-prod.oss-cn-hangzhou.aliyuncs.com/static/js/BizCharts.min.js'
,
'http://lingxi-frontend-prod.oss-cn-hangzhou.aliyuncs.com/static/js/LingXiUI.min.js'
,
'http://lingxi-frontend-prod.oss-cn-hangzhou.aliyuncs.com/static/js/antd.min.js'
,
'http://lingxi-frontend-prod.oss-cn-hangzhou.aliyuncs.com/static/js/formily-component.min.js'
,
],
extraBabelPlugins
:
[
[
'transform-remove-console'
,
{
exclude
:
[
'error'
,
'warn'
]
},
]
// 'http://lingxi-frontend-prod.oss-cn-hangzhou.aliyuncs.com/static/js/formily-component.min.js',
'http://lingxi-frontend-prod.oss-cn-hangzhou.aliyuncs.com/static/js/lingxi-design-ui.min.js'
,
],
chainWebpack
(
config
)
{
config
.
plugin
(
'antd-dayjs-webpack-plugin'
).
use
(
AntdDayjsWebpackPlugin
)
...
...
config/config.ts
View file @
5339eb45
...
...
@@ -42,7 +42,7 @@ const config: any = {
},
// layout: {},
esbuild
:
{},
//
mfsu: {},
mfsu
:
{},
antd
:
{},
locale
:
{
antd
:
true
,
...
...
@@ -55,7 +55,7 @@ const config: any = {
},
routes
,
extraBabelPlugins
:
[
[
'lodash'
],
//
['lodash'],
[
'import'
,
{
libraryName
:
'antd'
,
libraryDirectory
:
'es'
,
style
:
true
},
...
...
@@ -68,6 +68,11 @@ const config: any = {
],
[
'import'
,
{
libraryName
:
'lodash'
,
libraryDirectory
:
''
,
camel2DashComponentName
:
false
},
'lodash'
,
],
[
'import'
,
{
libraryName
:
'@umijs/hooks'
,
libraryDirectory
:
'lib'
,
...
...
@@ -75,6 +80,10 @@ const config: any = {
},
'@umijs/hooks'
,
],
// 将下划线转化关闭
[
'transform-remove-console'
,
{
exclude
:
[
'error'
,
'warn'
]
},
],
],
history
:
{
type
:
'browser'
,
// 'brower' | 'hash'
...
...
config/routes/index.ts
View file @
5339eb45
...
...
@@ -24,7 +24,7 @@ import asyncRoutes from '../router.config.json';
// export const routes = [CommodityRoute, MemberRoute, ShopRoute, ChannelRoute, TranactionRoute, AfterService, PayandSettleRoute, LogisticsRoute, AuthConfigRoute, HandlingRoute, BalaceRoute]
/** process.env.NODE_ENV === "development" */
const
isDev
=
tru
e
;
const
isDev
=
fals
e
;
const
homeRoute
=
{
path
:
`/memberCenter/home`
,
name
:
'home'
,
...
...
@@ -33,7 +33,7 @@ const homeRoute = {
component
:
'@/pages/home'
,
};
// const routes = isDev ? [ homeRoute, marketingRoute, MemberRoute ] : asyncRoutes;
const
routes
=
isDev
?
[
marketingRoute
]
:
asyncRoutes
;
const
routes
=
isDev
?
[
homeRoute
,
MemberRoute
,
marketingRoute
]
:
asyncRoutes
;
const
memberCenterRoute
=
{
path
:
'/memberCenter'
,
...
...
package.json
View file @
5339eb45
...
...
@@ -18,8 +18,10 @@
"start:dev"
:
"cross-env NODE_OPTIONS=--max_old_space_size=4096 umi dev"
,
"start:analyze"
:
"ANALYZE=1 umi dev"
,
"clean"
:
"rimraf node_modules"
,
"start"
:
"yarn api && yarn scripts:build && cross-env NODE_OPTIONS=--max_old_space_size=4096 umi dev"
,
"start"
:
"yarn api && yarn scripts:build && cross-env NODE_OPTIONS=--max_old_space_size=4096 UMI_ENV=local umi dev"
,
"start-noApi"
:
"yarn scripts:build && cross-env NODE_OPTIONS=--max_old_space_size=4096 UMI_ENV=local umi dev"
,
"build"
:
"yarn api && yarn scripts:build && yarn build:clean"
,
"build-noApi"
:
"yarn scripts:build && yarn build:clean"
,
"build:yxc"
:
"yarn api && yarn scripts:build-yxc && umi bu ild"
,
"build:analyze"
:
"cross-env NODE_OPTIONS=--max_old_space_size=16384 ANALYZE=1 UMI_ENV=prod umi build"
,
"build:dev"
:
"pm2 start scripts/devServer.js"
,
...
...
@@ -44,6 +46,7 @@
"start:study"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.207:8100 USE_ROUTE_CONFIG=false SOCKET_URL=ws://10.0.1.207:9400 yarn start"
,
"start:25"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.25:8100 USE_ROUTE_CONFIG=true SOCKET_URL=ws://10.0.0.25:9400 yarn start"
,
"start:v2"
:
"cross-env PRO_ENV=v2 yarn start"
,
"start-noApi:v2"
:
"cross-env PRO_ENV=v2 yarn start-noApi"
,
"start:v2Preview"
:
"cross-env PRO_ENV=v2Preview yarn start"
,
"start:v2scm"
:
"cross-env PRO_ENV=v2scm yarn start"
},
...
...
src/pages/transaction/saleOrder/agentOrder/components/addressModal/index.tsx
View file @
5339eb45
...
...
@@ -7,7 +7,7 @@ import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect'
import
{
useLinkEnumEffect
}
from
'@/components/NiceForm/linkages/linkEnum'
import
{
getManageCountryAreaGetTelCode
}
from
'@/services/ManageV2Api'
import
{
postLogisticsReceiverAddressAgentAdd
,
postLogisticsReceiverAddressAgentUpdate
}
from
'@/services/LogisticsV2Api'
import
{
getManageAreaAll
}
from
'@/services/ManageV2Api
/id8689
'
import
{
getManageAreaAll
}
from
'@/services/ManageV2Api'
import
{
message
}
from
'antd'
export
interface
AddressModalProps
{
...
...
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