Laravel mix generating blank page
I’m using laravel mix to pre-compile my code. When I run npm run dev or npm run production, I only get a white screen. So i did git checkout --f public/js/app.js
and then everything work, but when y execute npm run production
, the white screen appears again.
I also did a video to show what is going on: https://www.youtube.com/watch?v=WkPEdxj4HT4
Also here is my webpack.mix.js
let mix = require('laravel-mix');
mix.webpackConfig({
node: {
fs: 'empty'
}
});
// Manage the environments
require('dotenv').config();
// // Enables Browser sync
// Doc: https://github.com/JeffreyWay/laravel-
mix/blob/master/docs/browsersync.md
// Browsersync: https://browsersync.io/
// Browsersync enables livereloads and live pushes
let proxyUrl = process.env.BROWSERSYNC_PROXY_URL || 'localhost';
mix.browserSync(proxyUrl);
mix.js('resources/assets/js/app.js', 'public/js')
.version();
mix.sass('resources/assets/sass/app.scss', 'public/css')
.version();
from Laravel Questions and Answers https://laravelquestions.com/laravel/laravel-mix-generating-blank-page/
via Lzo Media
No comments:
Post a Comment