I'm building a Nuxt app with Vuetify buildModule setup and want to make a number of v-col
s sortable via VueDraggable (in my case, I built and added a super small Nuxt plugin which binds a global draggable
component from the default export from VueDraggable). The v-col
s should be wrapped with a v-row
, so I'm using the draggable
component with tag="v-row"
. This works well when running the dev server (nuxt-ts
in my case since I'm using Nuxt with typescript support), but fails when building and running in production mode.
To illustrate the issue, here is some info on what's happening. My source is as follows (i.e. I use Pug):
In development mode, my v-row is rendered correctly in the DOM from Vuetify:
But when building and running in production mode, the draggable component literally renders v-row
as the DOM tag instead of it going through rendering/parsing via Vuetify:
Does anyone have any idea on how to identify the root cause and how to resolve it here? I can likely hack my way around this problem for now, but want to know if this is a Nuxt bug or if anyone has solved this in any other way.
is="v-row"
insteadtag=...
? i think about this: vuejs.org/v2/guide/components.html#DOM-Template-Parsing-Caveats – Estradiazv-row
component. It's obviously an issue caused by tree shaking. – Ivan KlochkovDraggable
/sortablejs
etc.) – Ivan Klochkovv-row
is provided by vuetify. Also, I ran webpack-analyzer by addinganalyzer: true
to my nuxt.config.js and I see bothsortable.complete.esm.js
andvuedraggable.common.js
in the vendor bundle. – Lance Whatleydraggable
) – Lance Whatley