Skip to content

Commit 539fd11

Browse files
committed
Add addLoader and addRule to public api
1 parent 0ea9d74 commit 539fd11

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

index.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,32 @@ module.exports = {
135135
return this;
136136
},
137137

138+
/**
139+
* Adds a custom loader config
140+
*
141+
* @param {object} loader The loader config object
142+
*
143+
* @returns {exports}
144+
*/
145+
addLoader(loader) {
146+
webpackConfig.addLoader(loader);
147+
148+
return this;
149+
},
150+
151+
/**
152+
* Alias to addLoader
153+
*
154+
* @param {object} rule
155+
*
156+
* @returns {exports}
157+
*/
158+
addRule(rule) {
159+
this.addLoader(rule);
160+
161+
return this;
162+
},
163+
138164
/**
139165
* When enabled, files are rendered with a hash based
140166
* on their contents (e.g. main.a2b61cc.js)

0 commit comments

Comments
 (0)