@@ -339,7 +339,7 @@ module.exports = {
339
339
loader: " sass-loader" ,
340
340
options: {
341
341
sassOptions: {
342
- style: ` compressed` ,
342
+ style: " compressed" ,
343
343
loadPaths: [" absolute/path/a" , " absolute/path/b" ],
344
344
},
345
345
},
@@ -499,7 +499,7 @@ module.exports = {
499
499
{
500
500
loader: " sass-loader" ,
501
501
options: {
502
- additionalData: " $env: " + process .env .NODE_ENV + " ; " ,
502
+ additionalData: ` $env: ${ process .env .NODE_ENV } ; ` ,
503
503
},
504
504
},
505
505
],
@@ -531,10 +531,10 @@ module.exports = {
531
531
const relativePath = path .relative (rootContext, resourcePath);
532
532
533
533
if (relativePath === " styles/foo.scss" ) {
534
- return " $value: 100px;" + content;
534
+ return ` $value: 100px;${ content} ` ;
535
535
}
536
536
537
- return " $value: 200px;" + content;
537
+ return ` $value: 200px;${ content} ` ;
538
538
},
539
539
},
540
540
},
@@ -565,10 +565,10 @@ module.exports = {
565
565
const relativePath = path .relative (rootContext, resourcePath);
566
566
567
567
if (relativePath === " styles/foo.scss" ) {
568
- return " $value: 100px;" + content;
568
+ return ` $value: 100px;${ content} ` ;
569
569
}
570
570
571
- return " $value: 200px;" + content;
571
+ return ` $value: 200px;${ content} ` ;
572
572
},
573
573
},
574
574
},
@@ -788,8 +788,10 @@ module.exports = {
788
788
** webpack.config.js**
789
789
790
790
``` js
791
+ const path = require (" node:path" );
792
+
791
793
module .exports = {
792
- entry: [__dirname + " /src/scss/app.scss" ],
794
+ entry: [path . resolve ( __dirname , " . /src/scss/app.scss" ) ],
793
795
module: {
794
796
rules: [
795
797
{
@@ -818,8 +820,10 @@ module.exports = {
818
820
** webpack.config.js**
819
821
820
822
``` js
823
+ const path = require (" node:path" );
824
+
821
825
module .exports = {
822
- entry: [__dirname + " /src/scss/app.scss" ],
826
+ entry: [path . resolve ( __dirname , " . /src/scss/app.scss" ) ],
823
827
module: {
824
828
rules: [
825
829
{
0 commit comments