Skip to content
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

vue invoke makes logo.png blank #1037

Closed
elevatebart opened this issue Mar 26, 2018 · 2 comments
Closed

vue invoke makes logo.png blank #1037

elevatebart opened this issue Mar 26, 2018 · 2 comments

Comments

@elevatebart
Copy link
Contributor

Version

3.0.0-beta.6

Reproduction link

https://github.com/elevatebart/vuecliinvoke

Steps to reproduce

  1. vue create my-app
  2. vue add @vue/cli-plugin-typescript
  3. look at the file src/assets/logo.png

What is expected?

This file should contain the vue logo.

What is actually happening?

File seems corrupted.

@elevatebart
Copy link
Contributor Author

elevatebart commented Mar 26, 2018

It seems to be an encoding issue in the invoke file.
No need to specify utf-8 if loading a png file.
packages/@vue/cli/lib/invoke.js--30

res[file] = fs.readFileSync(path.resolve(context, file), 'utf-8')

I will cook up a quick pull-request.

@elevatebart
Copy link
Contributor Author

The pull request is ready ;)

#1038

yyx990803 pushed a commit that referenced this issue Mar 27, 2018
Using `vue invoke` was breaking all binary files because of encoding issues
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

2 participants