Doesnt work with standard elixir
Closed this issue · 1 comments
w0bbes commented
Hey, thanks for your work!
Im trying to make it work with Elixir.
Importing it from one of my components like this:
import pagination from 'vuestrap-base-components/src/components/pagination';
Gives me this error (probably babel related):
import 'vuestrap/components/pagination'
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
kzima commented
hey w0bbes, thanks for your feedback.
There are two ways of importing components to your project:
- If you are already using elixir in Laravel, than simply follow this instructions:
- setup .bowerrc to this directory "public/assets/bower"
- run
bower install vuestrap-base-components --save-dev
- add vuestrap-base js and css files to your html page as per this gist
- load components in Vue instance
- If you starting from scratch I would recomend to use Webpack for everything. With proper configuration, you can import desired componentns using ES6 syntax, plus you can compile your components on the fly with your app theme. I created this gist to demonstrate this. To make it work just try this:
- add files to the project as per this gist
- run
npm install
- run
webpack
In both cases you should see this result:
http://grab.by/MsJy
thanks,
Kris