Skip to content

Including a . in the migration script regex #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
travissouthard opened this issue Apr 26, 2021 · 0 comments
Open

Including a . in the migration script regex #71

travissouthard opened this issue Apr 26, 2021 · 0 comments

Comments

@travissouthard
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant