File tree 3 files changed +9
-1
lines changed
3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
# CHANGELOG
2
2
3
+ ## 4.0.1
4
+
5
+ * Fix ` application.debug = true ` by keeping ` process.env.NODE_ENV ` check in dist files, see https://github.com/symfony/stimulus-bridge/pull/121
6
+
3
7
## 4.0.0
4
8
5
9
### Breaking changes
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ function identifierForContextKey(key) {
25
25
//#region src/index.ts
26
26
function startStimulusApp ( context ) {
27
27
const application = Application . start ( ) ;
28
- application . debug = true ;
28
+ if ( process . env . NODE_ENV === "development" ) application . debug = true ;
29
29
if ( context ) application . load ( definitionsFromContext ( context ) ) ;
30
30
for ( const controllerName in symfonyControllers ) {
31
31
if ( ! Object . prototype . hasOwnProperty . call ( symfonyControllers , controllerName ) ) continue ;
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ export default defineConfig([
18
18
'@hotwired/stimulus' ,
19
19
] ,
20
20
plugins : [ typescript ( ) ] ,
21
+ define : {
22
+ // Keep `process.env.NODE_ENV` as a string, so it can be replaced by Webpack when user builds its app
23
+ 'process.env.NODE_ENV' : 'process.env.NODE_ENV' ,
24
+ } ,
21
25
} ,
22
26
23
27
/*
You can’t perform that action at this time.
0 commit comments