Skip to content

Including a . in the migration script regex #71

@travissouthard

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.

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