Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
a65063cd
Commit
a65063cd
authored
Jun 26, 2025
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改配置文件
parent
c996851e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
13 deletions
+44
-13
build.js
build/build.js
+32
-10
webpack.base.conf.js
build/webpack.base.conf.js
+1
-1
webpack.prod.conf.js
build/webpack.prod.conf.js
+4
-1
index.vue
src/components/index.vue
+7
-1
No files found.
build/build.js
View file @
a65063cd
...
...
@@ -16,26 +16,48 @@ spinner.start()
rm
(
path
.
join
(
config
.
build
.
assetsRoot
,
config
.
build
.
assetsSubDirectory
),
err
=>
{
if
(
err
)
throw
err
webpack
(
webpackConfig
,
(
err
,
stats
)
=>
{
spinner
.
stop
()
if
(
err
)
throw
err
if
(
err
)
{
console
.
error
(
chalk
.
red
(
'Webpack 构建失败:
\
n'
))
console
.
error
(
err
.
stack
||
err
)
if
(
err
.
details
)
{
console
.
error
(
err
.
details
)
}
process
.
exit
(
1
)
}
const
info
=
stats
.
toJson
()
if
(
stats
.
hasErrors
())
{
console
.
log
(
chalk
.
red
(
'
\
n构建出错:
\
n'
))
info
.
errors
.
forEach
(
error
=>
{
console
.
error
(
chalk
.
red
(
error
))
})
process
.
exit
(
1
)
}
if
(
stats
.
hasWarnings
())
{
console
.
log
(
chalk
.
yellow
(
'
\
n构建警告:
\
n'
))
info
.
warnings
.
forEach
(
warning
=>
{
console
.
warn
(
chalk
.
yellow
(
warning
))
})
}
process
.
stdout
.
write
(
stats
.
toString
({
colors
:
true
,
modules
:
false
,
children
:
false
,
// If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
children
:
true
,
// ✅ 设置为 true,显示所有子模块错误(如 ts-loader)
chunks
:
false
,
chunkModules
:
false
})
+
'
\
n
\
n'
)
if
(
stats
.
hasErrors
())
{
console
.
log
(
chalk
.
red
(
' Build failed with errors.
\
n'
))
process
.
exit
(
1
)
}
console
.
log
(
chalk
.
cyan
(
' Build complete.
\
n'
))
console
.
log
(
chalk
.
cyan
(
' ✅ 构建完成
\
n'
))
console
.
log
(
chalk
.
yellow
(
'
Tip: built files are meant to be served over an HTTP server.
\
n'
+
'
Opening index.html over file:// won
\'
t work.
\
n'
'
💡 提示: 请通过 HTTP 服务访问构建产物,而不是直接打开 index.html。
\
n'
+
'
file:// 方式无法正确加载资源。
\
n'
))
})
})
build/webpack.base.conf.js
View file @
a65063cd
...
...
@@ -31,7 +31,7 @@ module.exports = {
publicPath
:
process
.
env
.
NODE_ENV
===
'production'
?
'/crm/'
:
'/'
,
library
:
'erp'
,
// 子应用名称,需与主应用注册的一致
libraryTarget
:
'umd'
,
jsonpFunction
:
`webpackJsonp_erp`
,
// 避免与其他子应用冲突
chunkLoadingGlobal
:
`webpackJsonp_erp`
,
// 避免与其他子应用冲突
},
resolve
:
{
extensions
:
[
'.js'
,
'.vue'
,
'.json'
],
...
...
build/webpack.prod.conf.js
View file @
a65063cd
...
...
@@ -28,7 +28,10 @@ const webpackConfig = merge(baseWebpackConfig, {
output
:
{
path
:
config
.
build
.
assetsRoot
,
filename
:
utils
.
assetsPath
(
'js/[name].[chunkhash]'
+
version
+
'.js'
),
chunkFilename
:
utils
.
assetsPath
(
'js/[id].[chunkhash]'
+
version
+
'.js'
)
chunkFilename
:
utils
.
assetsPath
(
'js/[id].[chunkhash]'
+
version
+
'.js'
),
library
:
'erp'
,
libraryTarget
:
'umd'
,
chunkLoadingGlobal
:
`webpackChunk_erp`
,
// ✅ Webpack 5 方式
},
optimization
:
{
minimizer
:
[
...
...
src/components/index.vue
View file @
a65063cd
...
...
@@ -60,6 +60,12 @@
.TiChengScore
img
{
width
:
30px
;
}
.icon-imessage_top
{
/*Safari and Chrome*/
animation
:
mymove
5s
infinite
;
-webkit-animation
:
mymove
5s
infinite
;
}
</
style
>
<
template
>
...
...
@@ -5286,9 +5292,9 @@ export default {
}
.icon-imessage_top {
/*Safari and Chrome*/
animation: mymove 5s infinite;
-webkit-animation: mymove 5s infinite;
/*Safari and Chrome*/
}
@keyframes mymove {
...
...
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