Skip to content

Formik 1.0.0-beta.0 comes with broken import statements #625

@karol-majewski

Description

@karol-majewski

Describe the bug

Updating to '1.0.0-beta.0' broke my build due to the use of synthetic default imports. If you take a look at the history, you can see that what previously was import * as React from 'react' now becomes import React from React.

To Reproduce
Run tsc in your repository while having "allowSyntheticDefaultImports": false in your tsconfig.json.

Expected behavior
If 1.0.0-alpha.6 compiled without errors, 1.0.0-beta.0 should compile without errors as well, since the new version promises to deliver no breaking changes.

Suggested solution(s)
Turn the allowSyntheticDefaultImports flag to false in tsconfig.base.json file, and adjust the import statements accordingly. This way it will work for everyone.

Additional context

  • Formik Version: 1.0.0-beta.0
  • React Version:16.3.2
  • TypeScript Version: 2.8.3
  • OS: macOS
  • Node Version: 10.0.0.
  • Package Manager and Version: npm@6.0.0

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