jonathanpmartins / v-money3

Vue3 currency input/directive mask
MIT License
103 stars 27 forks source link

compile error #64

Closed ogulcankarayel5 closed 2 years ago

ogulcankarayel5 commented 2 years ago

After installed the package I am getting this compile error. How can I fix this

 error  in ./node_modules/v-money3/dist/v-money3.es.js

Module parse failed: Unexpected token (526:30)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|     let lastValue = null;
|     function change(evt) {
>       let value2 = evt.target?.value;
|       debug(props, "component change() -> evt.target.value", value2);
|       if (!(masked.value && !modelModifiers.value.number)) {
ogulcankarayel5 commented 2 years ago

Also I tried to install @babel/plugin-proposal-optional-chaining package. Not working

ogulcankarayel5 commented 2 years ago

I added a new line to vue.config.js because babel-loader ignores all files inside node_modules and last couple days "?" and "??" operators give compile errors.

transpileDependencies:["v-money3"]

It worked