gurghet / vue-smart-table

A simple table component for interactive tables built with Vue.js
http://www.gurghet.com/vue-smart-table
MIT License
143 stars 20 forks source link

Browserify error #6

Closed jackmcdade closed 8 years ago

jackmcdade commented 8 years ago

As soon as i try to require it, i get this:

Browserify Failed!: Unexpected token

/public/node_modules/vue-smart-table/src/components/SmartTable.vue:1
<template>
^
ParseError: Unexpected token
jackmcdade commented 8 years ago

I'm not convinced this is on your side though. I'm using Vueify and Laravel Elixir. It could be something about requiring a third-party Vueify component.

gurghet commented 8 years ago

I'm not familiar with this particular toolchain but I suspect vueify is not loaded correctly because the error appears to be the <template> tag. If I understand correctly Vueify should be in charge of parsing the .vue files. Do you have other .vue files that parse correctly?

jackmcdade commented 8 years ago

I do, but they're not npm dependencies. They're all local. Snippet:

// Vueify Objects (these work)
import Modal from './components/Modal.vue'
import FlashMessage from './components/FlashMessage.vue'
...
// Yours (doesn't work)
import SmartTable from 'vue-smart-table'
gurghet commented 8 years ago

import SmartTable from 'vue-smart-table' points to node_modules/vue-smart-table/scr/components/SmartTable.vue. It maybe something wrong with the Vueify configuration. Can you try to import other components? Like vue-strap? If only mine doesn't work I will check if there is something incompatible with browserify or elixir.

gurghet commented 8 years ago

I will close this issue, for now, feel free to share what you discovered even if it was not related to my component.