Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

extend gives error with Vite/Typescript/eslint #129

Open
Dylan190774 opened this issue Oct 5, 2024 · 1 comment
Open

extend gives error with Vite/Typescript/eslint #129

Dylan190774 opened this issue Oct 5, 2024 · 1 comment

Comments

@Dylan190774
Copy link

I'm using Vue3 with Vite and Typescript, and I'm trying to use a plugin, but the example code gives an error:

import { colord } from 'colord';
import a11yPlugin from 'colord/plugins/a11y';
extend([a11yPlugin]);

[vue-tsc] Cannot find name 'extend'.

I can't seem to find any information about the keyword 'extend' so I'm at a loss here.
Maybe installing a plugin with something like
colord.use(a11yPlugin)
would be a nice solution?

@Dylan190774
Copy link
Author

I'm sorry, found the answer. Just needed to import extend as well :)

import { colord, extend } from 'colord';
import a11yPlugin from 'colord/plugins/a11y';
extend([a11yPlugin]);

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@Dylan190774 and others