diff --git a/packages/calypso-build/bin/cb.js b/packages/calypso-build/bin/cb.js index ed3d23c7ca4323..f604efabde1dbb 100755 --- a/packages/calypso-build/bin/cb.js +++ b/packages/calypso-build/bin/cb.js @@ -1,7 +1,12 @@ #!/usr/bin/env node +/** + * External dependencies + */ +const path = require( 'path' ); + if ( ! process.argv.some( arg => arg.startsWith( '--config' ) ) ) { - process.argv.push( '--config', require.resolve( '@automattic/calypso-build/webpack.config.js' ) ); + process.argv.push( '--config', path.join( __dirname, '..', 'webpack.config.js' ) ); } require( 'webpack-cli' );