Skip to content

Can vue-cli detect the syntax error when import an empty string? #4914

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

Closed
givingwu opened this issue Dec 2, 2019 · 3 comments
Closed

Can vue-cli detect the syntax error when import an empty string? #4914

givingwu opened this issue Dec 2, 2019 · 3 comments

Comments

@givingwu
Copy link

givingwu commented Dec 2, 2019

What problem does this feature solve?

when user import an empty string like import '' in SFC, the webpack build will stuck at 98% after emitting CopyPlugin.

issue#4174
issue#4252

What does the proposed API look like?

Hope the vue-template-compiler could check the path string is an available string for require(path), and if not use the error-overlay to indicates what and where error happened.

Thanks.

@haoqunjiang
Copy link
Member

the webpack build will stuck

This is due to the same bug as #4891


After that bug to be fixed, we'll need to correctly detect the error and show the right error message in https://github.com/geowarin/friendly-errors-webpack-plugin/

Contributions are welcome.

@givingwu
Copy link
Author

givingwu commented Dec 6, 2019

Nevertheless, there's a bug in Vue CLI that we forgot to process the webpack failed hook in the serve command.

ok, i knew that, thanks.

@jdz321
Copy link

jdz321 commented Jul 8, 2020

the webpack build will stuck

This is due to the same bug as #4891

After that bug to be fixed, we'll need to correctly detect the error and show the right error message in https://github.com/geowarin/friendly-errors-webpack-plugin/

Contributions are welcome.

#4891 已经修掉了 这个问题有进展吗

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

No branches or pull requests

3 participants