laravelとvue.jsを使いたいので
php artisan ui vue npm install && npm run dev
を実行しました。
webpack.jsの内容は、
const mix = require('laravel-mix') /* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel application. By default, we are compiling the Sass | file for the application as well as bundling up all the JS files. | */ mix.browserSync('photo') .js('resources/js/app.js', 'public/js') .sass('resources/sass/app.scss', 'public/css') .version()
上記のようにしました。
blade.phpでのheadタグ内で
<script src="{{ mix('js/app.js') }}" defer></script>
を読み込むと
GET http://localhost:3000/js/app.js?id=eabb2b65dae729c5975a net::ERR_ABORTED 404 (Not Found)
となってしまいます。よろしくおねがいします。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/09/12 07:37 編集