Files
rspade_system/node_modules/laravel-mix/src/components/Notifications.js
root bd5809fdbd Reorganize RSpade directory structure for clarity
Improve Jqhtml_Integration.js documentation with hydration system explanation
Add jqhtml-laravel integration packages for traditional Laravel projects

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 09:41:48 +00:00

41 lines
1.1 KiB
JavaScript

const { Component } = require('./Component');
module.exports = class Notifications extends Component {
passive = true;
/**
* webpack plugins to be appended to the master config.
*/
webpackPlugins() {
if (!this.enabled) {
return [];
}
if (process.env.DISABLE_NOTIFICATIONS === '1') {
return [];
}
const WebpackNotifierPlugin = require('webpack-notifier');
return [
new WebpackNotifierPlugin({
appID: 'Laravel Mix',
title: 'Laravel Mix',
alwaysNotify: this.context.config.notifications.onSuccess,
timeout: false,
hint: process.platform === 'linux' ? 'int:transient:1' : undefined,
contentImage: this.context.paths.root(
'node_modules/laravel-mix/icons/laravel.png'
)
})
];
}
get enabled() {
const { notifications } = this.context.config;
return notifications && (notifications.onSuccess || notifications.onFailure);
}
};