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

the missing of output raises error when size larger than limit #3

Open
wayou opened this issue Sep 8, 2018 · 3 comments · May be fixed by #4
Open

the missing of output raises error when size larger than limit #3

wayou opened this issue Sep 8, 2018 · 3 comments · May be fixed by #4

Comments

@wayou
Copy link

wayou commented Sep 8, 2018

with limit set there's error when image size exceeds.

the config:

import image from "rollup-plugin-img";
...
image({
    limit: 1
})

the CLI message:

[!] Error: Could not load xx.jpg (imported by xx.tsx): The "path" argument must be of type string. Received type undefined
@wayou wayou changed the title ths missing of output rases error when size larger than limit the missing of output raises error when size larger than limit Sep 8, 2018
@wayou wayou linked a pull request Sep 8, 2018 that will close this issue
@timini
Copy link

timini commented Jan 23, 2019

also encountering this

@dtatualveoo
Copy link

@wayou @timini It seems to be working for me if I add the output option like so: output: 'dist/images'

However for my VueJS app i have:

  • input <img alt="Vue logo" src="./assets/logo.png">
  • output t("img",{attrs:{alt:"Vue logo",src:"logo.png"}})

The final source of the img isn't as it should be...

@a474516631
Copy link

@dtatualveoo @wayou I tried to modify the plug-in and now run it correctly
1615189507(1)

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 a pull request may close this issue.

4 participants