You can provide custom parameters on the env variable from the command line, so for this example you could call:
webpack --env.entry='./app.js' --env.output='bundle.js'
and use them in your webpack by doing
module.exports = env => ({
entry: env.entry,
output: {
filename: env.output
},
});