Fix passing arguments from backstage-cli backend:dev to package
The old Webpack version would invoke the backend package in the same process, hence `process.argv` would contain the arguments passed to `backstage-cli`. This no longer seems to be true in Webpack 5, so arguments must be explicitly passed. Signed-off-by: Joel Low <joel@joelsplace.sg>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Fix `backstage-cli backend:dev` argument passing
|
||||
@@ -318,6 +318,7 @@ export async function createBackendConfig(
|
||||
new RunScriptWebpackPlugin({
|
||||
name: 'main.js',
|
||||
nodeArgs: options.inspectEnabled ? ['--inspect'] : undefined,
|
||||
args: process.argv.slice(3), // drop `node backstage-cli backend:dev`
|
||||
}),
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
...(checksEnabled
|
||||
|
||||
Reference in New Issue
Block a user