I use apex chart in nuxt
and apply plugins with my code
this working in dev mode
cross-env NODE_ENV=development HOST=0.0.0.0 PORT=3000 nodemon server/index.js --watch server
but not working in build source
nuxt build && cross-env NODE_ENV=production HOST=0.0.0.0 PORT=80 node server/index.js
Here is my codes
plugins/vue-apexchar.js
import Vue from 'vue'
import VueApexCharts from 'vue-apexcharts'
Vue.component('VueApexCharts', VueApexCharts);
nuxt.config.js
plugins: [
{ src : '~/plugins/vue-apexchart.js', ssr : false },
],
build: {
vendor : [
'vue-apexchart'
]
}
weekChart.vue
<VueApexCharts max-width="300" type="area" :options="chartOptions" :series="series"></VueApexCharts>
these codes working in dev mode but not working build files
I needs your helps for solve this problomes
Please Help me
Here is my source code > https://github.com/zoz0312/Nuxt_Blog
<client-only>
<MY COMPONENT/>
</client-only>
Using 'client-only' tag solved this problem
"This component is used to purposely render a component only on client-side."
my plugins working only client-side so use that tags, I can Solved this problem
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With