Skip to content

Commit 5d310aa

Browse files
author
winjo
committed
fix(cli): 修复 link 时 host options 定义问题
1 parent de59873 commit 5d310aa

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

packages/cli/src/commander.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ extensionProgram
5151
extensionProgram
5252
.command('link <extensionDirs...>')
5353
.description('link local extension for dev')
54-
.option('-h, --host', 'local extension static file service host, default: `localhost`')
54+
.option('-h, --host [value]', 'local extension static file service host, default: `localhost`')
5555
.action((extensionDirs, options) => {
5656
installLocalExtensions(extensionDirs, options).catch((err) => console.error(err));
5757
});

packages/toolkit/webpack/config.build.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ const libBundle = createWebpackConfig({
1212
mode: 'production',
1313
tsconfigPath: path.join(__dirname, '../../../tsconfig.json'),
1414
outputPath: path.join(__dirname, '../../alex/bundle'),
15-
define: Object.keys(define).reduce((obj, key) => {
16-
obj[key] = JSON.stringify(define[key]);
17-
return obj;
18-
}, {}),
15+
define: {
16+
...Object.keys(define).reduce((obj, key) => {
17+
obj[key] = JSON.stringify(define[key]);
18+
return obj;
19+
}, {}),
20+
__non_webpack_require__: '() => {}',
21+
},
1922
webpackConfig: {
2023
context: path.join(__dirname, '../../..'),
2124
entry: {

0 commit comments

Comments
 (0)