Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added hook for peerDeps installed check
- Loading branch information
1 parent
2b86b41
commit d30db39
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import 'source-map-support/register'; | ||
|
||
module.exports = async () => { | ||
try { | ||
require.resolve('webpack'); | ||
} catch (err) { | ||
console.error("Please install 'webpack' to use the plugin"); | ||
console.error('-> When using npm: npm i -D webpack'); | ||
console.error('-> When using yarn: yarn add -D webpack'); | ||
|
||
throw err; | ||
} | ||
|
||
try { | ||
require.resolve('webpack-cli'); | ||
} catch (err) { | ||
console.error("Please install 'webpack-cli' to use the plugin"); | ||
console.error('-> When using npm: npm i -D webpack-cli'); | ||
console.error('-> When using yarn: yarn add -D webpack-cli'); | ||
|
||
throw err; | ||
} | ||
|
||
try { | ||
require.resolve('webpack-dev-server'); | ||
} catch (err) { | ||
console.error("Please install 'webpack-dev-server' to use the plugin"); | ||
console.error('-> When using npm: npm i -D webpack-dev-server'); | ||
console.error('-> When using yarn: yarn add -D webpack-dev-server'); | ||
|
||
throw err; | ||
} | ||
}; |