Code Monkey home page Code Monkey logo

Comments (8)

krisanalfa avatar krisanalfa commented on May 18, 2024 2

Hi @iraklisg, I'm using Laravel 5.3.21, which is it uses Vue 2.x as default. I was struggling to make this awesome work implemented on my project. So here's my bootstrap.js file:

/**
 * Vue is a modern JavaScript library for building interactive web interfaces
 * using reactive data binding and reusable components. Vue's API is clean
 * and simple, leaving you to focus on building your next great project.
 */

const Vue = window.Vue = require('vue');
const VueMaterial = require('vue-material');
const VueResource = require('vue-resource');

Vue.use(VueMaterial.default);
Vue.use(VueResource);

To load CSS, you may append this line to your app.scss:

// Vue Material
@import "node_modules/vue-material/dist/vue-material";

Run:

gulp

Everything works fine now. Here's my package.json file:

{
  "private": true,
  "scripts": {
    "prod": "gulp --production",
    "dev": "gulp watch"
  },
  "devDependencies": {
    "bootstrap-sass": "^3.3.7",
    "css-loader": "^0.25.0",
    "gulp": "^3.9.1",
    "jquery": "^3.1.0",
    "laravel-elixir": "^6.0.0-11",
    "laravel-elixir-vue-2": "^0.2.0",
    "laravel-elixir-webpack-official": "^1.0.2",
    "lodash": "^4.16.2",
    "vue": "^2.0.2",
    "vue-material": "^0.2.0",
    "vue-resource": "^1.0.3"
  },
  "dependencies": {}
}

from vue-material.

marcosmoura avatar marcosmoura commented on May 18, 2024 2

Vue.use(VueMaterial.default) will no longer work on the next version. You should use Vue.use(VueMaterial) instead.

from vue-material.

marcosmoura avatar marcosmoura commented on May 18, 2024

Hi @iraklisg!

Which version of node and Elixir are you using?
I think that Elixir is trying to compile vue-material with Babel again through Webpack config.
I will try to simulate this error here and I answer this later, ok?

Thank you!

from vue-material.

pnishank avatar pnishank commented on May 18, 2024

worked for me thanks 👍 :) @krisanalfa

from vue-material.

marcosmoura avatar marcosmoura commented on May 18, 2024

@krisanalfa Thanks a lot man. I will improve the documentation adding this Elixir part. As the Laravel community embraced Vue, this can help more user to figure it out how to work with Vue Material.

from vue-material.

krisanalfa avatar krisanalfa commented on May 18, 2024

Hope I can contribute to it's development too, gotta have a couple time firstly to understanding this great work. But anyway, I am so glad to help, man.

from vue-material.

iraklisg avatar iraklisg commented on May 18, 2024

@krisanalfa sorry for the late reply, I just found the time to check your solution and I do confirm that everything works fine. @marcosmoura congrats for the polished work you've done so far

from vue-material.

alphaelf avatar alphaelf commented on May 18, 2024

tanks marcos

from vue-material.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.