const mix = require('laravel-mix');
const HtmlWebpackPlugin = require('html-webpack-plugin')
/*
|--------------------------------------------------------------------------
| 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.options({
terser: {
extractComments: false
}
})
mix.webpackConfig({
plugins: [
new HtmlWebpackPlugin({
filename: 'dist/index.html',
template: 'src/html/index.html.ejs',
inject: false,
title: 'Lessons Learned / Start',
content: 'Page 1',
}),
new HtmlWebpackPlugin({
filename: 'dist/page-1.html',
template: 'src/html/index.html.ejs',
inject: false,
title: 'Lessons Learned / Page 1',
content: 'Page 2',
}),
new HtmlWebpackPlugin({
filename: 'dist/page-2.html',
template: 'src/html/index.html.ejs',
inject: false,
title: 'Lessons Learned / 2',
content: 'Start',
})
]
})
mix
.js('src/js/index.js', 'dist/js')
.sass('src/scss/styles.scss', 'dist/css');