Skip to content

Commit 7d2a6b1

Browse files
committed
Add a .webpackConfig option for manually passing webpack configuration. See https://twitter.com/_developit/status/955969121149161473
1 parent be2178c commit 7d2a6b1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/configure.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default function configure(options) {
3131
'webpack.config.js'
3232
];
3333

34-
let webpackConfig;
34+
let webpackConfig = options.webpackConfig;
3535

3636
let pkg = tryRequire(res('package.json'));
3737

@@ -46,9 +46,11 @@ export default function configure(options) {
4646
}
4747
}
4848

49-
for (let i=WEBPACK_CONFIGS.length; i--; ) {
50-
webpackConfig = tryRequire(res(WEBPACK_CONFIGS[i]));
51-
if (webpackConfig) break;
49+
if (!webpackConfig) {
50+
for (let i=WEBPACK_CONFIGS.length; i--; ) {
51+
webpackConfig = tryRequire(res(WEBPACK_CONFIGS[i]));
52+
if (webpackConfig) break;
53+
}
5254
}
5355

5456
webpackConfig = webpackConfig || {};

0 commit comments

Comments
 (0)