Skip to content

Including a . in the migration script regex #71

Description

@travissouthard

I ran the migration script last week and ran into a bit of trouble with the import statements.
Instead of changing the import lines to * from "react-ionicons" it skipped over the . at the end of the line and the from became react-ionicons.js

I locally changed line 25 in the migration file to include a . in the regex and that worked the second time.
Example:
line = line.replace(/(react-ionicons\/lib\/[a-zA-Z]*)/, 'react-ionicons')
became:
line = line.replace(/(react-ionicons\/lib\/[a-zA-Z.]*)/, 'react-ionicons')

And that solved the problem for us and helped the import lines match what's recommended in the documentation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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