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) {
2020 throw new Error ( 'Are you trying to require index.js directly?' ) ;
2121}
2222
23- const webpackConfig = new WebpackConfig ( runtimeConfig ) ;
23+ let webpackConfig = new WebpackConfig ( runtimeConfig ) ;
2424
2525module . exports = {
2626 /**
@@ -396,7 +396,7 @@ module.exports = {
396396 /**
397397 * Is this currently a "production" build?
398398 *
399- * @returns {* }
399+ * @returns {boolean }
400400 */
401401 isProduction ( ) {
402402 return webpackConfig . isProduction ( ) ;
@@ -421,5 +421,17 @@ module.exports = {
421421 console . log ( pe . render ( error ) ) ;
422422 process . exit ( 1 ) ; // eslint-disable-line
423423 }
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 ) ;
424436 }
425437} ;
You can’t perform that action at this time.
0 commit comments