Using CLI to generate a project with
vue create project
How can i integrate php code in .Vue files and not break the building command :
npm run build
As an example i want to add <?php ?> code inside the famous Home.vue view like so :
<template>
<div class="home">
<img alt="Vue logo" src="../assets/logo.png">
<HelloWorld msg="Welcome to Your Vue.js App"/>
<?php echo("this break the building"); ?>
</div>
</template>
<script>
// @ is an alias to /src
import HelloWorld from "@/components/HelloWorld.php";
export default {
name: "home",
components: {
HelloWorld
}
};
</script>
Changing Home.vue to Home.php dont solve the problem.
npm run buildin frontend repo everytime you run some serve, test or deploy command in backend repo.