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
[bugfix] adding file extensions to import statements #4533
Conversation
new changes since last fork
did a mini fix 1a8f348 because jscs threw an error |
@nnmrts - your tests are failing |
@nnmrts, your regular expression in not targeting imports with multiple lines. For example, in // months
import {
defaultLocaleMonths,
defaultLocaleMonthsShort,
} from '../units/month'; |
'export default moment;' | ||
].concat(files.map(function (file) { | ||
var identifier = path.basename(file, '.js').replace('-', '_'); | ||
return 'import ' + identifier + ' from "./' + file + '";'; | ||
return 'import ' + identifier + ' from .js"./' + file + '";'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addition of the .js
in this line appears to be the cause of the failing tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, i know...already fixed that locally, but there are still bugs...
This has been sitting for a long time, so I will close it. Thanks for opening this request. |
This should resolve issue #4203.
I used the search and replace tool of vscode to do this, with these two regexes: