File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 11# CHANGELOG
22
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+
37## 4.0.0
48
59### Breaking changes
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ function identifierForContextKey(key) {
2525//#region src/index.ts
2626function startStimulusApp ( context ) {
2727 const application = Application . start ( ) ;
28- application . debug = true ;
28+ if ( process . env . NODE_ENV === "development" ) application . debug = true ;
2929 if ( context ) application . load ( definitionsFromContext ( context ) ) ;
3030 for ( const controllerName in symfonyControllers ) {
3131 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([
1818 '@hotwired/stimulus' ,
1919 ] ,
2020 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+ } ,
2125 } ,
2226
2327 /*
You can’t perform that action at this time.
0 commit comments