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

Not working #2

Open
dimiatr opened this issue Dec 8, 2023 · 1 comment
Open

Not working #2

dimiatr opened this issue Dec 8, 2023 · 1 comment

Comments

@dimiatr
Copy link

dimiatr commented Dec 8, 2023

Hi. I want to use your library, I am working without a framework. I have vanilla js, but following all the instructions I have nothing connects.

image

image

What am I doing wrong?

@nosir
Copy link
Owner

nosir commented Dec 11, 2023

Since you want to use vanilla js with the bundled umd library js file, the import {...} from 'cleave-zen' module way won't work, you'd follow this vanilla js demo: https://github.com/nosir/cleave-zen-examples/blob/main/examples/vanilla/src/index.js, which uses window.cleaveZen to refer to the library.

Also what's the cleave-zen version in your package.json? I just pushed a fix to cleave-zen-demo repo, you should pull and yarn again, then in your node_modules, it has the latest version 0.0.14
Or more simpler way, you can replace that <script src="./node_modules/...cleave-zen.umd.js"> with <script src="https://unpkg.com/cleave-zen">, or just download that cloud file to your local src folder.

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

No branches or pull requests

2 participants