File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,11 @@ const environment = require('./environment');
77const bundler = getBundler ( ) ;
88
99if ( devBuild && ! isHMR ) {
10- environment . loaders . get ( 'sass' ) . use . find ( ( item ) => item . loader === 'sass-loader' ) . options . sourceMap = false ;
10+ const sassLoader = environment . loaders . get ( 'sass' ) ;
11+ const sassLoaderConfig = sassLoader && sassLoader . use . find ( ( item ) => item . loader === 'sass-loader' ) ;
12+ if ( sassLoaderConfig ) {
13+ sassLoaderConfig . options . sourceMap = false ;
14+ }
1115}
1216
1317environment . plugins . append (
Original file line number Diff line number Diff line change 11const merge = require ( 'webpack-merge' ) ;
22
3- const devBuild = process . env . NODE_ENV === 'production' ? 'production' : 'development' ;
3+ const nodeEnv = process . env . NODE_ENV === 'production' ? 'production' : 'development' ;
44const { getBundler } = require ( './bundlerUtils' ) ;
55const environment = require ( './environment' ) ;
66
@@ -14,7 +14,7 @@ environment.plugins.insert(
1414 new bundler . DefinePlugin ( {
1515 TRACE_TURBOLINKS : true ,
1616 'process.env' : {
17- NODE_ENV : devBuild ,
17+ NODE_ENV : nodeEnv ,
1818 } ,
1919 } ) ,
2020 { after : 'Environment' } ,
Original file line number Diff line number Diff line change 4444 "@hotwired/stimulus-webpack-helpers" : " ^1.0.1" ,
4545 "@hotwired/turbo-rails" : " ^7.3.0" ,
4646 "@rails/actioncable" : " 7.0.5" ,
47+ "@rspack/cli" : " 2.0.0-beta.7" ,
48+ "@rspack/core" : " 2.0.0-beta.7" ,
4749 "@rescript/core" : " ^0.5.0" ,
4850 "@rescript/react" : " ^0.11.0" ,
4951 "@swc/core" : " ^1.13.5" ,
109111 "devDependencies" : {
110112 "@babel/eslint-parser" : " ^7.16.5" ,
111113 "@babel/preset-react" : " ^7.18.6" ,
112- "@rspack/cli" : " 2.0.0-beta.7" ,
113- "@rspack/core" : " 2.0.0-beta.7" ,
114114 "@rspack/plugin-react-refresh" : " 1.6.1" ,
115115 "@tailwindcss/typography" : " ^0.5.10" ,
116116 "@testing-library/dom" : " ^10.4.1" ,
You can’t perform that action at this time.
0 commit comments