Skip to content

Commit 385fe89

Browse files
committed
fix: 🎨 修复 import 错误
1 parent fc1ea6b commit 385fe89

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

packages/guard-core-v4/scripts/webpack.base.config.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,33 @@ const webpack = require('webpack')
88

99
const { resolve } = require('./utils')
1010

11+
class BuildProgressPlugin {
12+
apply(compiler) {
13+
compiler.hooks.compile.tap('BuildProgressPlugin', () => {
14+
console.log('Webpack 正在编译...')
15+
})
16+
17+
compiler.hooks.compilation.tap('BuildProgressPlugin', () => {
18+
console.log('Webpack 正在创建编译内容...')
19+
})
20+
21+
compiler.hooks.emit.tapAsync(
22+
'BuildProgressPlugin',
23+
(compilation, callback) => {
24+
console.log('Webpack 正在生成资源...')
25+
callback()
26+
}
27+
)
28+
29+
compiler.hooks.done.tap('BuildProgressPlugin', stats => {
30+
console.log('Webpack 构建完成!')
31+
if (stats.hasErrors()) {
32+
console.error('构建过程中出现错误:', stats.compilation.errors)
33+
}
34+
})
35+
}
36+
}
37+
1138
module.exports = function webpackConfigFn({ reactVersion = '16' }) {
1239
return {
1340
resolve: {
@@ -66,6 +93,7 @@ module.exports = function webpackConfigFn({ reactVersion = '16' }) {
6693
]
6794
},
6895
plugins: [
96+
new BuildProgressPlugin(),
6997
// new (require('webpack-bundle-analyzer').BundleAnalyzerPlugin)({
7098
// analyzerPort: 4040
7199
// }),

packages/guard-core-v4/src/MFA/core/nington.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { VerifyCodeInput } from '../VerifyCodeInput'
1919
import { IconFont } from '../../IconFont'
2020

2121
import { MfaBusinessAction, useMfaBusinessRequest } from '../businessRequest'
22-
import { useGuardPublicConfig } from 'src/_utils'
22+
import { useGuardPublicConfig } from '../../_utils'
2323

2424
const { useRef } = React
2525

0 commit comments

Comments
 (0)