File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -1072,6 +1072,24 @@ class Encore {
1072
1072
return webpackConfig . isProduction ( ) ;
1073
1073
}
1074
1074
1075
+ /**
1076
+ * Is this currently a "dev" build?
1077
+ *
1078
+ * @returns {boolean }
1079
+ */
1080
+ isDev ( ) {
1081
+ return webpackConfig . isDev ( ) ;
1082
+ }
1083
+
1084
+ /**
1085
+ * Is this currently a "dev-server" build?
1086
+ *
1087
+ * @returns {boolean }
1088
+ */
1089
+ isDevServer ( ) {
1090
+ return webpackConfig . isDevServer ( ) ;
1091
+ }
1092
+
1075
1093
/**
1076
1094
* Use this at the bottom of your webpack.config.js file:
1077
1095
*
Original file line number Diff line number Diff line change @@ -688,6 +688,14 @@ class WebpackConfig {
688
688
isProduction ( ) {
689
689
return this . runtimeConfig . environment === 'production' ;
690
690
}
691
+
692
+ isDev ( ) {
693
+ return this . runtimeConfig . environment === 'dev' ;
694
+ }
695
+
696
+ isDevServer ( ) {
697
+ return this . isDev ( ) && this . runtimeConfig . useDevServer ;
698
+ }
691
699
}
692
700
693
701
module . exports = WebpackConfig ;
You can’t perform that action at this time.
0 commit comments