Thanks for the guide!
While looking for more info about this, I found a couple of "improvements" (newish to this, so not sure if everything is correct):
resources/assets/sass/app.scss - use webpack tilde syntax
@import "custom";
@import "~bootstrap/scss/bootstrap";
resources/assets/js/bootstrap.js - use require() instead of import - not sure about this, seems to change how webpack generates webpack_require.
/**
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
* for JavaScript based Bootstrap features such as modals and tabs. This
* code may be modified to fit the specific needs of your application.
*/
require('bootstrap');
webpack.mix.js- don't require webpack, use mix autoload
let 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.autoload({
jquery: ['$', 'window.jQuery', 'jQuery'],
'popper.js': ['Popper']
})
.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css');