Cleave phone + webpack in vue.js
See original GitHub issueHi, i am working in a project made with vue.js, and i am using cleave.js in some components. It was working good, until a couple of weeks ago when we decided to use webpack to build the project. We noticed that our phone input component wasn’t working anymore and it throws an error.
In my component I require it like this (we are also using babel):
import Cleave from 'cleave.js'
require('cleave.js/dist/addons/cleave-phone.mx');
And then create a new instance like this:
this.cleave = new Cleave(this.$el, {
phone: true,
phoneRegionCode: 'MX'
});
The error i get is:
Error: [cleave.js] Please include phone-type-formatter.{country}.js lib
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
vue-cleave-component - npm
Vue.js component for cleave.js. ... Start using vue-cleave-component in your project by running `npm i vue-cleave-component`.
Read more >Vue.js 2.x component for Cleave.js
vue -cleave-component · Features · Installation · Usage · Available props · Install in non-module environments (without webpack) · Run examples on your ......
Read more >How can I combine cleave.js with element in Vue?
js 2 with Element and I would like to make use of Cleave.js for masking. I understand how to make a basic masker...
Read more >vue-cleave-component - NPM Package Overview - Socket
Clone this repo · You should have node-js >=12.13 and yarn >=1.22 pre-installed · Install dependencies yarn install · Run webpack dev server...
Read more >cleave - VueJS Generators - GitBook
cleaveOptions · phone · false · Boolean · Enable to trigger phone shortcut mode. This phone mode has to be used together with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @patriciabobes, This worked for me:
Hope this helps!
Hi! It doesn’t works for me. Kind of a different scenario though.