Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
quantum-blocks
Commits
68a18da3
Commit
68a18da3
authored
Jan 19, 2021
by
郝聪敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 添加测试环境
parent
01156d3c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
113 additions
and
7 deletions
+113
-7
index.ts
app/web/config/index.ts
+3
-1
prod.config.ts
app/web/config/prod.config.ts
+1
-1
test.config.ts
app/web/config/test.config.ts
+9
-0
index.d.ts
app/web/index.d.ts
+1
-0
index.ts
app/web/page/editor/router/index.ts
+4
-4
package.json
package.json
+1
-1
webpack.config.js
webpack.config.js
+94
-0
No files found.
app/web/config/index.ts
View file @
68a18da3
import
prod
from
'
./prod.config
'
;
import
dev
from
'
./dev.config
'
;
export
default
process
.
env
.
NODE_ENV
===
'
production
'
?
prod
:
dev
;
import
test
from
'
./test.config
'
;
export
default
process
.
env
.
SENTRY_ENV
?
test
:
process
.
env
.
NODE_ENV
===
'
production
'
?
prod
:
dev
;
app/web/config/prod.config.ts
View file @
68a18da3
const
protocol
=
EASY_ENV_IS_BROWSER
?
window
.
location
.
protocol
:
'
https
'
;
export
default
{
apiHost
:
`https://quantum-
fe.liangkebang.net
/`
,
apiHost
:
`https://quantum-
blocks.q-gp.com
/`
,
qiniuHost
:
`https://appsync.lkbang.net/`
,
shenceUrl
:
`
${
protocol
}
//bn.xyqb.com/sa?project=production`
,
opapiHost
:
`
${
protocol
}
//opapi.q-gp.com`
,
...
...
app/web/config/test.config.ts
0 → 100644
View file @
68a18da3
const
protocol
=
EASY_ENV_IS_BROWSER
?
window
.
location
.
protocol
:
'
https
'
;
export
default
{
apiHost
:
`https://quantum-fe.liangkebang.net/`
,
qiniuHost
:
`https://appsync.lkbang.net/`
,
shenceUrl
:
`
${
protocol
}
//bn.xyqb.com/sa?project=production`
,
opapiHost
:
`
${
protocol
}
//opapi.q-gp.com`
,
qiniuUpHost
:
`
${
protocol
}
//up-z0.qiniup.com`
,
};
app/web/index.d.ts
View file @
68a18da3
declare
var
EASY_ENV_IS_NODE
:
boolean
;
declare
var
EASY_ENV_IS_BROWSER
:
boolean
;
type
PlainObject
<
T
=
any
>
=
{
[
key
:
string
]:
T
};
\ No newline at end of file
app/web/page/editor/router/index.ts
View file @
68a18da3
...
...
@@ -28,22 +28,22 @@ export default function createRouter() {
{
name
:
'
detail
'
,
path
:
'
/detail/:pageId?
'
,
component
:
Dashboard
component
:
()
=>
import
(
'
../view/dashboard/index.vue
'
)
},
{
name
:
'
list
'
,
path
:
'
/list
'
,
component
:
PageList
component
:
()
=>
import
(
'
../view/pageList/index.vue
'
)
},
{
name
:
'
my
'
,
path
:
'
/my
'
,
component
:
myPage
component
:
()
=>
import
(
'
../view/myPage/index.vue
'
)
},
{
name
:
'
template
'
,
path
:
'
/template
'
,
component
:
template
component
:
()
=>
import
(
'
../view/template/index.vue
'
)
},
]
});
...
...
package.json
View file @
68a18da3
...
...
@@ -8,7 +8,7 @@
"backend"
:
"nohup egg-scripts start --port 7001 --workers 4"
,
"dev"
:
"egg-bin dev -r egg-ts-helper/register"
,
"debug"
:
"egg-bin debug -r egg-ts-helper/register"
,
"build"
:
"easy build --devtool"
,
"build"
:
"easy build --devtool
--size
"
,
"tsc"
:
"ets && tsc -p tsconfig.json"
,
"clean"
:
"ets clean"
,
"kill"
:
"easy kill"
,
...
...
webpack.config.js
View file @
68a18da3
...
...
@@ -66,8 +66,102 @@ module.exports = {
name
:
'
webpack-sentry-plugin
'
,
args
:
SentryConfig
}
},
{
define
:{
'
process.env
'
:
{
SENTRY_ENV
:
JSON
.
stringify
(
process
.
env
.
SENTRY_ENV
)
}
}
}
],
optimization
:
{
namedModules
:
true
,
namedChunks
:
true
,
runtimeChunk
:
{
name
:
'
runtime
'
},
splitChunks
:
{
name
:
false
,
chunks
:
'
all
'
,
cacheGroups
:
{
default
:
false
,
saSdk
:
{
name
:
"
chunk-sa-sdk
"
,
// split cherryUI into a single package
priority
:
22
,
// the weight needs to be larger than libs and app or it will be packaged into libs or app
test
:
/
[\\/]
node_modules
[\\/]
sa-sdk-javascript
[\\/]
/
,
// in order to adapt to cnpm
enforce
:
true
},
cherryUI
:
{
name
:
'
chunk-cherryUI
'
,
// 分离组件库
priority
:
21
,
chunks
:
'
all
'
,
test
:
/
[\\/]
node_modules
[\\/]
@qg
[\\/]
cherry-ui
[\\/]
/
,
enforce
:
true
},
lodash
:
{
name
:
'
chunk-lodash
'
,
// 分离组件库
priority
:
19
,
test
:
/
[\\/]
node_modules
[\\/]
lodash
[\\/]
/
,
enforce
:
true
},
vue
:
{
name
:
'
chunk-vue
'
,
// 分离组件库
priority
:
17
,
test
:
/
[\\/]
node_modules
[\\/]
vue
[\\/]
/
,
enforce
:
true
},
iview
:
{
name
:
'
chunk-iview
'
,
// 分离组件库
priority
:
16
,
test
:
/
[\\/]
node_modules
[\\/]
iview
[\\/]
/
,
enforce
:
true
},
lodash
:
{
name
:
'
chunk-lodash
'
,
// 分离组件库
priority
:
15
,
test
:
/
[\\/]
node_modules
[\\/]
lodash
[\\/]
/
,
enforce
:
true
},
ravenJs
:
{
name
:
'
chunk-ravenJs
'
,
// 分离组件库
priority
:
14
,
test
:
/
[\\/]
node_modules
[\\/]
raven-js
[\\/]
/
,
enforce
:
true
},
common
:
{
name
:
'
chunk-common
'
,
minChunks
:
3
,
priority
:
3
,
reuseExistingChunk
:
true
,
chunks
(
chunk
)
{
return
[
'
login
'
,
'
editor
'
,
'
activity
'
].
includes
(
chunk
.
name
);
},
enforce
:
true
},
vendors
:
{
name
:
'
common
'
,
chunks
:
'
all
'
,
minChunks
:
3
,
priority
:
2
,
test
:
/node_modules/
,
reuseExistingChunk
:
true
},
styles
:
{
name
:
'
common
'
,
chunks
:
'
all
'
,
minChunks
:
3
,
priority
:
1
,
test
:
/
\.(
css|less|scss|stylus
)
$/
,
priority
:
50
,
}
}
}
},
devtool
:
'
source-map
'
,
customize
(
webpackConfig
){
// 此外 webpackConfig 为原生生成的 webpack config,可以进行自定义处理
...
...
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