Skip to content

Commit

Permalink
feat: override metro commands by default
Browse files Browse the repository at this point in the history
  • Loading branch information
jbroma committed Apr 3, 2024
1 parent 2008bc0 commit 270ca1a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/repack/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ const webpackConfigOption = {
},
};

module.exports = [
const commands = [
{
name: 'webpack-bundle',
name: 'bundle',
description: bundleCommand.description,
options: bundleCommand.options.concat(
{
Expand All @@ -96,7 +96,7 @@ module.exports = [
func: require('./dist/commands/bundle').bundle,
},
{
name: 'webpack-start',
name: 'start',
options: startCommand.options.concat(
{
name: '--verbose',
Expand Down Expand Up @@ -124,3 +124,10 @@ module.exports = [
func: require('./dist/commands/start').start,
},
];

const webpackCommands = commands.map((command) => ({
...command,
name: `webpack-${command.name}`,
}));

module.exports = [...commands, ...webpackCommands];

0 comments on commit 270ca1a

Please sign in to comment.