47 lines
1.5 KiB
JavaScript
47 lines
1.5 KiB
JavaScript
const mix = require("laravel-mix");
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| 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.js("resources/js/app.js", "public/js")
|
|
.js("resources/js/service/service.js", "public/js/service/service.min.js")
|
|
.js("resources/js/whois.js", "public/js/whois.min.js")
|
|
.js("resources/js/core.js", "public/js/core.min.js")
|
|
.js("resources/js/main.js", "public/js/main.min.js")
|
|
.js("resources/js/service/vminfo.js", "public/js/service/vminfo.min.js")
|
|
.postCss(
|
|
"resources/css/app.css",
|
|
"public/css",
|
|
[require("@tailwindcss/postcss")]
|
|
);
|
|
|
|
// Disable source maps to reduce compilation time
|
|
mix.sourceMaps(false);
|
|
|
|
if (mix.inProduction()) {
|
|
mix.version();
|
|
}
|
|
|
|
// Disable notifications to avoid the snoreToast errors
|
|
mix.disableNotifications();
|
|
|
|
// Configure watch options to reduce unnecessary compilations
|
|
mix.webpackConfig({
|
|
watchOptions: {
|
|
// Ignore node_modules and other non-essential directories
|
|
ignored: /node_modules|vendor|storage|public\/assets/,
|
|
// Reduce polling frequency (in milliseconds)
|
|
poll: 1000,
|
|
// Wait for multiple changes before recompiling
|
|
aggregateTimeout: 500
|
|
}
|
|
});
|