https://github.com/begueradj/poc-datetimer-picker
I want to use this plugin in my Nuxt.js/VuetifyJs application. For this purpose, I created a plugins/datetime-picker.js file:
import Vue from 'vue'
import DatetimePicker from 'vuetify-datetime-picker'
Vue.use(DatetimePicker)
And in nuxt.config.js, declare the plugin as recommended on the documentation:
export default {
plugins: ['~/plugins/datetime-picker']
}
I expect the application to launch without errrors
I run yarn run dev to launch the server, I do not see any error in the Terminal, but when I open the broswer on http://localhost:3000/ I see:
SyntaxError
Unexpected identifier
Github link for the bug
Why this is happening ? I simply followed the steps mentioned on the documentation.
How to fix this ?
Its not issue of nuxt. Your package that u are trying to use not transpiled. Its cant be consumed as it is.
You need to add it to transpile
https://nuxtjs.org/api/configuration-build/#transpile
https://codesandbox.io/s/fervent-nobel-dpiil