Home

Issue: 948

`nuxt generate` with v-on:click

[issue link]

I was generating a simple project from nuxjs website. It works fine but when i added a button with v-on:click event.,in the generated one, the button doesn’t work. It works with npm run dev.
Please help me out. Thanks
Below is my index.vue

<template>
  <section class="container">
    <div>
      <logo/>
      <h1 class="title">
        NUXT
      </h1>
      <h2 class="subtitle">
        Universal Vue.js Application
      </h2>
      <div class="links">
        <a href="https://nuxtjs.org/" target="_blank" class="button--green">Documentation</a>
        <a href="https://github.com/nuxt/nuxt.js" target="_blank" class="button--grey">Github</a>
      </div>
      <button @click="test('1231')"> testButton </button>
    </div>
  </section>
</template>

<script>
import Logo from '~components/Logo.vue'

export default {
  components: {
    Logo
  },
  methods: {
    test: function (val) {
      console.log(val)
    }
  }
}
This question is available on Nuxt.js community (#c816)