const mix = require('laravel-mix'); // plugins const SvgSpritemapPlugin = require('svg-spritemap-webpack-plugin') /* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel applications. By default, we are compiling the CSS | file for the application as well as bundling up all the JS files. | */ mix.webpackConfig({ module: { rules: [{ test: /\.riot$/, use: [{ loader: '@riotjs/webpack-loader', query: { hot: false } }] } ]}, plugins: [ new SvgSpritemapPlugin('resources/icons/*.svg', { output: { filename: 'symbol-defs.svg', chunk: { keep: true } }, sprite: { prefix: 'icon-' } }) ] }) mix .js('resources/js/bootstrap.js', 'public/js') .js('resources/js/views/home.js', 'public/js') .js('resources/js/views/bucket.js', 'public/js') .js('resources/js/views/bucket-single.js', 'public/js') .sass('resources/scss/bootstrap.scss', 'public/css') .options({ terser: { extractComments: false, } })