title: Vue.JS 2.5.1 : Uncaught SyntaxError: Unexpected token export
body: <p>I was trying to make a radio button using VueJS and Bootstrap Vue, but this happens when I make it. I'm expecting this to be syntax error just like what it said, but I can't seem find any clue.</p>
  
  <p>So I tried to copy pasted the code, here's the full code of test_radio.php</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap/dist/css/bootstrap.min.css"/&gt;
      &lt;link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.css"/&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;template&gt;
    &lt;div&gt;
      &lt;b-form-group label="Radios using &lt;code&gt;options&lt;/code&gt;"&gt;
        &lt;b-form-radio-group id="radios1" v-model="selected" :options="options" name="radioOpenions"&gt;
        &lt;/b-form-radio-group&gt;
      &lt;/b-form-group&gt;
  
      &lt;b-form-group label="Radios using sub-components"&gt;
        &lt;b-form-radio-group id="radios2" v-model="selected" name="radioSubComponent"&gt;
          &lt;b-form-radio value="first"&gt;Toggle this custom radio&lt;/b-form-radio&gt;
          &lt;b-form-radio value="second"&gt;Or toggle this other custom radio&lt;/b-form-radio&gt;
          &lt;b-form-radio value="third" disabled&gt;This one is Disabled&lt;/b-form-radio&gt;
          &lt;b-form-radio :value="{fourth: 4}"&gt;This is the 4th radio&lt;/b-form-radio&gt;
        &lt;/b-form-radio-group&gt;
      &lt;/b-form-group&gt;
  
      &lt;div class="mt-3"&gt;
        Selected: &lt;strong&gt;{{ selected }}&lt;/strong&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  
      &lt;!-- Vue.js @2.5.1 --&gt;
      &lt;script type="text/javascript" src="js/vue.js"&gt;&lt;/script&gt;
  
      &lt;!-- Add this after vue.js --&gt;
      &lt;script src="//unpkg.com/babel-polyfill@latest/dist/polyfill.min.js"&gt;&lt;/script&gt;
      &lt;script src="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.js"&gt;&lt;/script&gt;
  
  &lt;!-- The error is below --&gt;
  &lt;script&gt;
  export default {
    data () {
      return {
        selected: 'first',
        options: [
          { text: 'Toggle this custom radio', value: 'first' },
          { text: 'Or toggle this other custom radio', value: 'second' },
          { text: 'This one is Disabled', value: 'third', disabled: true },
          { text: 'This is the 4th radio', value: {fourth: 4} }
        ]
      }
    }
  }
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Che6u.png" rel="nofollow noreferrer">Uncaught SyntaxError: Unexpected token export</a></p>
  
  <p>I'm pretty sure there's a mistake on the code on Export, but I already checked many times and I can't seem to find the error in the syntax.</p>
  
  <p>I'm still new to Javascript, Vue.JS, and Bootstrap Vue, so any help would be useful, thanks! Anyway this code comes from Bootstrap Vue's <a href="https://bootstrap-vue.js.org/docs/components/form-radio" rel="nofollow noreferrer">documentation</a>.</p>