Skip to content

Commit 006abea

Browse files
committed
fix(build-plugin-alt): openUrl 配置在组件状态下不生效
1 parent 8e8eb44 commit 006abea

3 files changed

Lines changed: 13 additions & 8 deletions

File tree

packages/build-plugin-alt/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 1.0.9
4+
5+
- `fix` openUrl 配置在组件状态下不生效
6+
37
## 1.0.8
48

59
- `fix` 删除无用逻辑,去除 style-loader 依赖,解决构建报错问题

packages/build-plugin-alt/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alilc/build-plugin-alt",
3-
"version": "1.0.8",
3+
"version": "1.0.9",
44
"description": "build-scripts plugin template for developers",
55
"main": "lib/index.js",
66
"files": [

packages/build-plugin-alt/src/index.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,19 @@ const plugin: IPlugin = ({ context, registerTask, onGetWebpackConfig, onHook, lo
6767
builtinConfig(config);
6868
});
6969
}
70-
onHook('after.start.devServer', ({ url }) => {
71-
if (inject && openUrl) {
72-
openBrowser(openUrl);
73-
} else {
74-
openBrowser(openUrl || url);
75-
}
76-
})
70+
7771
} else {
7872
onGetWebpackConfig('lowcode-dev', (config) => {
7973
// console.log(config.toConfig());
8074
})
8175
}
76+
onHook('after.start.devServer', ({ url }) => {
77+
if (inject && openUrl) {
78+
openBrowser(openUrl);
79+
} else {
80+
openBrowser(openUrl || url);
81+
}
82+
})
8283
onHook('before.start.load', ({ args }) => {
8384
if (inject) {
8485
makeInjectInfo({ pkg, port: args.port, type });

0 commit comments

Comments
 (0)