SyntaxError Unexpected Identifier

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 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

Link to reproduce

Github link for the bug
Why this is happening ? I simply followed the steps mentioned on the documentation.
How to fix this ?

Add the transpile build option in your nuxt.config.js file. This option is used in case of ES6 plugins.

  build: {
    transpile: ['vuetify-datetime-picker']
  }