Fixing for component

We need to check for both type and type-component in order to work across different environments.
Automatically rewritten for npm.