Answer the question
In order to leave comments, you need to log in
Laravel+Elixir+vue.js?
Good time everyone, please help me figure it out. The second day has gone already, it does not work with single-file components. Do not judge strictly because the front is not my forte. In general, I kneaded everything according to the instructions:
"devDependencies": {
"gulp": "^3.8.8",
"laravel-elixir": "^4.0.0",
"laravel-elixir-vueify": "^1.0.0",
......
elixir(function(mix) {
// mix.scriptsIn('resources/assets/js', 'resources/assets/res.js')
mix.browserify('app.js');
});
import Vue from 'vue'
import Hero from './Hero.vue'
new Vue({
el: '#ahtung',
components: { Hero }
});
<template>
<div class="profile">
{{ name }}
</div>
</template>
<script>
export default {
data () {
return {
name: 'Matt Stauffer'
};
}
};
</script>
<style>
.profile {
background: #eee;
border: 1px solid #aaa;
border-radius: 2em;
margin: 2em auto;
min-height: 150px;
padding: 2em;
width: 300px;
}
</style>
<hero></hero>
Answer the question
In order to leave comments, you need to log in
I asked it myself, I answer it myself:
They could write about it in the documentation about the elixir! A little outraged even)))
The error described above is connected with the intersection of the blade mintaxis and the view component, if not smeared:
This part is -
<template>
<div class="profile">
{{ name }}
</div>
</template>
<template>
<div class="profile">
@{{ name }}
</div>
</template>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question