Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
65e822ea
Unverified
Commit
65e822ea
authored
Feb 13, 2019
by
陈帅
Committed by
GitHub
Feb 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Officially traded will use cdn to optimize bizchart (#3535)
parent
bd060c06
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
config/config.js
config/config.js
+8
-3
src/pages/document.ejs
src/pages/document.ejs
+6
-1
No files found.
config/config.js
View file @
65e822ea
...
...
@@ -6,6 +6,7 @@ import defaultSettings from '../src/defaultSettings';
import
slash
from
'
slash2
'
;
const
{
pwa
,
primaryColor
}
=
defaultSettings
;
const
{
NODE_ENV
,
APP_TYPE
,
TEST
}
=
process
.
env
;
const
plugins
=
[
[
...
...
@@ -32,7 +33,7 @@ const plugins = [
},
}
:
{},
...(
!
process
.
env
.
TEST
&&
os
.
platform
()
===
'
darwin
'
...(
!
TEST
&&
os
.
platform
()
===
'
darwin
'
?
{
dll
:
{
include
:
[
'
dva
'
,
'
dva/router
'
,
'
dva/saga
'
,
'
dva/fetch
'
],
...
...
@@ -47,7 +48,7 @@ const plugins = [
// 针对 preview.pro.ant.design 的 GA 统计代码
// 业务上不需要这个
if
(
process
.
env
.
APP_TYPE
===
'
site
'
)
{
if
(
APP_TYPE
===
'
site
'
)
{
plugins
.
push
([
'
umi-plugin-ga
'
,
{
...
...
@@ -60,7 +61,7 @@ export default {
// add for transfer to umi
plugins
,
define
:
{
APP_TYPE
:
process
.
env
.
APP_TYPE
||
''
,
APP_TYPE
:
APP_TYPE
||
''
,
},
treeShaking
:
true
,
targets
:
{
...
...
@@ -75,6 +76,10 @@ export default {
},
externals
:
{
'
@antv/data-set
'
:
'
DataSet
'
,
// if is production externals react react-dom and bizcharts
...(
NODE_ENV
===
'
production
'
?
{
react
:
'
React
'
,
'
react-dom
'
:
'
ReactDOM
'
,
bizcharts
:
'
BizCharts
'
}
:
{}),
},
// proxy: {
// '/server/api/': {
...
...
src/pages/document.ejs
View file @
65e822ea
...
...
@@ -9,7 +9,12 @@
/>
<title>
Ant Design Pro
</title>
<link
rel=
"icon"
href=
"/favicon.png"
type=
"image/x-icon"
/>
<script
src=
"https://gw.alipayobjects.com/os/antv/pkg/_antv.data-set-0.9.6/dist/data-set.min.js"
></script>
<
%
if(context.env =
==
'
production
')
{
%
>
<script
src=
"//gw.alipayobjects.com/os/lib/react/16.8.1/umd/react.production.min.js"
></script>
<script
src=
"//gw.alipayobjects.com/os/lib/react-dom/16.8.1/umd/react-dom.production.min.js"
></script>
<script
src=
"//gw.alipayobjects.com/os/lib/bizcharts/3.4.3/umd/BizCharts.min.js"
></script>
<
%
}%
>
<script
src=
"https://gw.alipayobjects.com/os/lib/antv/data-set/0.10.1/dist/data-set.min.js"
></script>
</head>
<body>
<noscript>
Sorry, we need js to run correctly!
</noscript>
...
...
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