Closed iabukai closed 4 years ago
I ran into this as well.
@iabukai @timmushen Can you try with treeshaking module?
I had the same issue and instead of using 'v-currency-field/nuxt'
I've added 'v-currency-field/nuxt-treeshaking'
to modules and it worked.
If you are using vuetify 2... you have to add v-currency-field with treeshaking, because when you compile the javascript VuetifyLoaderPlugin dont identify v-text-field inside v-currency-field component.
As @goranculibrk said... use treeshaking module,
Using treeshaking module works on production (build && start), but stops working in development.
Using treeshaking module works on production (build && start), but stops working in development. i solved this by adding this code in nuxt.config.js modules, but i dont know if this is a good practice or not.
process.env.NODE_ENV !== 'production' ? ['v-currency-field/nuxt', { locale: 'pt-BR', decimalLength: 0, autoDecimalMode: true, defaultValue: 0, valueAsInteger: false, allowNegative: true }] : ['v-currency-field/nuxt-treeshaking', { locale: 'pt-BR', decimalLength: 0, autoDecimalMode: true, defaultValue: 0, valueAsInteger: false, allowNegative: true }],
Using treeshaking module works on production (build && start), but stops working in development.
I 'll test treeshaking module in development.
Using treeshaking module works on production (build && start), but stops working in development. i solved this by adding this code in nuxt.config.js modules, but i dont know if this is a good practice or not.
process.env.NODE_ENV !== 'production' ? ['v-currency-field/nuxt', { locale: 'pt-BR', decimalLength: 0, autoDecimalMode: true, defaultValue: 0, valueAsInteger: false, allowNegative: true }] : ['v-currency-field/nuxt-treeshaking', { locale: 'pt-BR', decimalLength: 0, autoDecimalMode: true, defaultValue: 0, valueAsInteger: false, allowNegative: true }],
I'm not sure if it's a good practice, but you could make it simpler by using a ternary if
on the module name instead of the whole array.
I have the same problem and this solution my issue
If you are using vuetify 2... you have to add v-currency-field with treeshaking, because when you compile the javascript VuetifyLoaderPlugin dont identify v-text-field inside v-currency-field component.
As @goranculibrk said... use treeshaking module,
Using treeshaking module works on production (build && start), but stops working in development.
Using treeshaking module works on production (build && start), but stops working in development. i solved this by adding this code in nuxt.config.js modules, but i dont know if this is a good practice or not.
process.env.NODE_ENV !== 'production' ? ['v-currency-field/nuxt', { locale: 'pt-BR', decimalLength: 0, autoDecimalMode: true, defaultValue: 0, valueAsInteger: false, allowNegative: true }] : ['v-currency-field/nuxt-treeshaking', { locale: 'pt-BR', decimalLength: 0, autoDecimalMode: true, defaultValue: 0, valueAsInteger: false, allowNegative: true }],
The problem is not on v-currency-field module, if you are using treeshaking, you have to set it to vuetify to working in DEV:
buildModules: [ ['@nuxtjs/vuetify', {treeShake: true}] ], /* ** Nuxt.js modules */ modules: [ ['v-currency-field/nuxt-treeshaking', { locale: 'pt-BR', decimalLength: 2, autoDecimalMode: true, min: null, max: null, defaultValue: 0, valueAsInteger: false, allowNegative: true }], ],
Here a basic project code: basicNuxt
It works in development mode, but in production, the input field does not appear and the console shows the following errors.
"nuxt": "^2.0.0",
I tried to use the v-currendy-field as plugin and as a module too