Commit a65063cd authored by 罗超's avatar 罗超

修改配置文件

parent c996851e
......@@ -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'
))
})
})
......@@ -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'],
......
......@@ -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: [
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment