File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ if (!runtimeConfig) {
20
20
throw new Error ( 'Are you trying to require index.js directly?' ) ;
21
21
}
22
22
23
- const webpackConfig = new WebpackConfig ( runtimeConfig ) ;
23
+ let webpackConfig = new WebpackConfig ( runtimeConfig ) ;
24
24
25
25
module . exports = {
26
26
/**
@@ -396,7 +396,7 @@ module.exports = {
396
396
/**
397
397
* Is this currently a "production" build?
398
398
*
399
- * @returns {* }
399
+ * @returns {boolean }
400
400
*/
401
401
isProduction ( ) {
402
402
return webpackConfig . isProduction ( ) ;
@@ -421,5 +421,17 @@ module.exports = {
421
421
console . log ( pe . render ( error ) ) ;
422
422
process . exit ( 1 ) ; // eslint-disable-line
423
423
}
424
+ } ,
425
+
426
+ /**
427
+ * Resets the Encore state to allow building a new config.
428
+ *
429
+ * getWebpackConfig should be used before resetting to build
430
+ * a config for the existing state.
431
+ *
432
+ * @returns {void }
433
+ */
434
+ reset ( ) {
435
+ webpackConfig = new WebpackConfig ( runtimeConfig ) ;
424
436
}
425
437
} ;
You can’t perform that action at this time.
0 commit comments