Skip to content

Fix for 'loader.charAt is not a function' in v8 #1166

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

Merged
merged 2 commits into from
Mar 6, 2018
Merged

Conversation

natocTo
Copy link

@natocTo natocTo commented Feb 19, 2018

I have some older project still runnig on Vue 1 and crash on 'loader.charAt is not a function' error like in the #624 issue.
I am not javascript expert, but this edit solve my issue and maybe can solve also for other.

I have some older project still runnig on Vue 1 and crash on 'loader.charAt is not a function' error like in the vuejs#624 issue.
I am not javascript expert, but this edit solve my issue and maybe can solve also for other.
Copy link
Member

@Jinjiang Jinjiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vue-loader@14+ does no longer support webpack 1 any more. https://github.com/vuejs/vue-loader/releases/tag/v14.0.0 ~
~ If you really want to fix it for webpack 1, I suggest you re-create a PR to branch 13.x https://github.com/vuejs/vue-loader/tree/13.x and with good test cases.

Sorry I misunderstand some detail. But test case is still strongly recommended.
Thanks.

@natocTo
Copy link
Author

natocTo commented Feb 25, 2018

Thanks for reply. I am not quite similiar with javascript testing but I can look at it..

Btw. same logic I added here (8.x is last loader for Vue 1) you can found in version 12 here https://github.com/vuejs/vue-loader/blob/v12/lib/loader.js#L484 . The function is same. Maybe can you found test there. :)

@natocTo
Copy link
Author

natocTo commented Feb 26, 2018

So I am not able to test this, I am sorry.

I clone this repo. Switch the branch to 8x, run npm install and npm test. Even without this issue I end up with 6+ failing tests. So I do not know how fix all this tests and even write this new one.

If this can not be able to merged without test, maybe we can close it. But same logic is used in newer version and for me this fix the issue 'loader.charAt is not a function'.

@Jinjiang
Copy link
Member

OK, that's alright. I will have a deep look at it. :-)
Thanks.

@yyx990803 yyx990803 merged commit ec06bc3 into vuejs:8.x Mar 6, 2018
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

Successfully merging this pull request may close these issues.

3 participants