Closed ghost closed 5 years ago
I'm using webpack aliases: alias: { _components_: path.resolve(__dirname, 'src/components') }
alias: { _components_: path.resolve(__dirname, 'src/components') }
and import components as import { TodoList } from '_components_/TodoList';
import { TodoList } from '_components_/TodoList';
With this type of import I don't get the prop types of the imported component. And the component props doesn't shows too.
How to use the prop-types with aliases?
Webpack aliases shouldn’t be able to have any impact on that, and this library has nothing to do with it.
If the component has propTypes attached, they’ll show up with the component. If not, it’s a webpack issue.
I'm using webpack aliases:
alias: { _components_: path.resolve(__dirname, 'src/components') }
and import components as
import { TodoList } from '_components_/TodoList';
With this type of import I don't get the prop types of the imported component. And the component props doesn't shows too.
How to use the prop-types with aliases?