File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -1100,6 +1100,32 @@ class Encore {
1100
1100
return this ;
1101
1101
}
1102
1102
1103
+ /**
1104
+ * Configure Webpack loaders rules (`module.rules`).
1105
+ * This is a low-level function, be careful when using it.
1106
+ *
1107
+ * https://webpack.js.org/concepts/loaders/#configuration
1108
+ *
1109
+ * For example, if you are using Vue and ESLint loader,
1110
+ * this is how you can configure ESLint to lint Vue files:
1111
+ *
1112
+ * Encore
1113
+ * .enableEslintLoader()
1114
+ * .enableVueLoader()
1115
+ * .configureLoaderRule('eslint', (loader) => {
1116
+ * loader.test = /\.(jsx?|vue)/;
1117
+ * });
1118
+ *
1119
+ * @param {string } name
1120
+ * @param {function } callback
1121
+ * @return {Encore }
1122
+ */
1123
+ configureLoaderRule ( name , callback ) {
1124
+ webpackConfig . configureLoaderRule ( name , callback ) ;
1125
+
1126
+ return this ;
1127
+ }
1128
+
1103
1129
/**
1104
1130
* If enabled, the output directory is emptied between each build (to remove old files).
1105
1131
*
You can’t perform that action at this time.
0 commit comments