Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Production build only error: Vuetify Unable to locate target data-app

I only get this error in the production build. enter image description here

I have read this doc and this related issue but I still cannot get it to work. <v-app> is wrapped around the v-dialog why does it still complain?

Here is my code

// App.vue
<template>
  <v-app id="inspire">
    <v-dialog max-width="500px">
      <v-card>
        <v-card-title>
          Create
        </v-card-title>
      </v-card>
    </v-dialog>
  </v-app>
</template>

\\main.js
import Vue from "vue";
import store from "./store/store";
import Vuetify from "vuetify";
import "vuetify/dist/vuetify.min.css";
import App from "./App.vue";

Vue.use(Vuetify);
Vue.config.productionTip = false;
new Vue({
  el: "#app",
  store,
  render: h => h(App)
});

like image 446
Jake He Avatar asked Jun 25 '19 22:06

Jake He


2 Answers

Add data-app attribute to the target

<div data-app>
      <MyComponent />
</div>
like image 191
bereket gebredingle Avatar answered Oct 19 '22 20:10

bereket gebredingle


add v-app

<v-app>
      <MyComponent />
</v-app>
like image 40
ßãlãjî Avatar answered Oct 19 '22 20:10

ßãlãjî