This commit is contained in:
2022-04-07 18:09:31 +05:30
parent 36ea86d8e6
commit 1c779ef816
14095 changed files with 1769361 additions and 47 deletions
+66
View File
@@ -0,0 +1,66 @@
/**
* @abstract
* @internal (for now)
**/
class Component {
/** Whether or not to automatically register this component */
passive = false;
/** Whether or not this component requires dependency reloading */
requiresReload = false;
/**
* The name used to call this component.
*
* @deprecated
**/
caller = '';
/**
*
* @param {import("../Mix")} mix
*/
constructor(mix) {
this.context = mix;
}
/**
* Specifiy one or more dependencies that must
* be installed for this component to work
*
* @returns {import("../Dependencies").Dependency[]}
**/
dependencies() {
return [];
}
/**
* Add rules to the webpack config
*
* @returns {import('webpack').RuleSetRule[]}
**/
webpackRules() {
return [];
}
/**
* Add plugins to the webpack config
*
* @returns {import('webpack').WebpackPluginInstance[]}
**/
webpackPlugins() {
return [];
}
/**
* Update the webpack config
*
* @param {import('webpack').Configuration} config
* @returns {import('webpack').Configuration}
**/
webpackConfig(config) {
return config;
}
}
module.exports.Component = Component;