Skip to content

Production build should not include proptypes definitions #1882

@jochenberger

Description

@jochenberger

The proptypes specifications should be stripped from the production build.
The definitions could be wrapped in if (process.env.NODE_ENV !== 'production') clauses, but that won't get replaced in the browserify bundling step.
That probably makes it a feature that could go into https://github.com/JedWatson/react-component-gulp-tasks, but it might be a better idea to switch to Webpack or even Rollup on the long run. @JedWatson, any advice how this should be solved?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions