這裏是我的gulpfile.js文件設置VUE和laravel麻煩
var elixir = require('laravel-elixir');
require('laravel-elixir-webpack');
elixir(function(mix) {
mix.styles([
'vendor.css',
'font-awesome.css',
'theme-default.css',
'custom.css'
],'public/assets/css/index.css');
mix.scripts([
'vendor.js',
'demodata.js',
'app.js',
'demo.js'
],'public/assets/js/index.js');
mix.webpack('main.js');
mix.version('js/main.js','assets/css/index.css','assets/js/index.js');
});
這裏是我的master.blade.php
<!DOCTYPE html>
<html lang= "en">
<head>
<meta charset = "utf-8">
<title>Wiredcademy | @yield('title')</title>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0, shrink-to-fit=no">
<meta name="format-detection" content="telephone=no">
<link href="http://fonts.googleapis.com/css?family=Montserrat:400,700%7cSource+Sans+Pro:200,400,600,700,900,400italic,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="{{ elixir('assets/css/index.css') }}">
</head>
<body class="index menu-default hover-default scroll-animation">
@yield('contents')
<script src="{{ elixir('assets/js/index.js') }}"></script>
<script src="{{ elixir('js/main.js') }}"></script>
</body>
</html>
我是相當新的使用一飲而盡。因此,我確實輸入了gulp和gulp watch命令來分別記錄腳本和樣式表,並分別更改我的main.js但是當我通過php artisan serve部署應用程序時。
它說:在資產清單沒有定義
文件資產/ CSS/index.css。 (查看: A:\ xampp \ htdocs \ restate \ resources \ views \ layouts \ master.blade.php) (查看: A:\ xampp \ htdocs \ restate \ resources \ views \ layouts \ master.blade.php )
我正在使用laravel 5.2 – d3cypher
然後檢查我的更新。 – EddyTheDove
哦,謝謝讓我試試這個 – d3cypher