@@ -33,12 +33,12 @@ const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== "false";
3333
3434const reactRefreshRuntimeEntry = require . resolve ( "react-refresh/runtime" ) ;
3535const reactRefreshWebpackPluginRuntimeEntry = require . resolve (
36- "@pmmmwh/react-refresh-webpack-plugin"
36+ "@pmmmwh/react-refresh-webpack-plugin" ,
3737) ;
3838const babelRuntimeEntry = require . resolve ( "babel-preset-react-app" ) ;
3939const babelRuntimeEntryHelpers = require . resolve (
4040 "@babel/runtime/helpers/esm/assertThisInitialized" ,
41- { paths : [ babelRuntimeEntry ] }
41+ { paths : [ babelRuntimeEntry ] } ,
4242) ;
4343const babelRuntimeRegenerator = require . resolve ( "@babel/runtime/regenerator" , {
4444 paths : [ babelRuntimeEntry ] ,
@@ -52,15 +52,15 @@ const emitErrorsAsWarnings = process.env.ESLINT_NO_DEV_ERRORS === "true";
5252const disableESLintPlugin = process . env . DISABLE_ESLINT_PLUGIN === "true" ;
5353
5454const imageInlineSizeLimit = parseInt (
55- process . env . IMAGE_INLINE_SIZE_LIMIT || "10000"
55+ process . env . IMAGE_INLINE_SIZE_LIMIT || "10000" ,
5656) ;
5757
5858// Check if TypeScript is setup
5959const useTypeScript = fs . existsSync ( paths . appTsConfig ) ;
6060
6161// Check if Tailwind config exists
6262const useTailwind = fs . existsSync (
63- path . join ( paths . appPath , "tailwind.config.js" )
63+ path . join ( paths . appPath , "tailwind.config.js" ) ,
6464) ;
6565
6666// Get the path to the uncompiled service worker (if it exists).
@@ -180,7 +180,7 @@ module.exports = function (webpackEnv) {
180180 options : {
181181 sourceMap : true ,
182182 } ,
183- }
183+ } ,
184184 ) ;
185185 }
186186 return loaders ;
@@ -239,7 +239,7 @@ module.exports = function (webpackEnv) {
239239 defaultWebpack : [ "webpack/lib/" ] ,
240240 config : [ __filename ] ,
241241 tsconfig : [ paths . appTsConfig , paths . appJsConfig ] . filter ( ( f ) =>
242- fs . existsSync ( f )
242+ fs . existsSync ( f ) ,
243243 ) ,
244244 } ,
245245 } ,
@@ -299,7 +299,7 @@ module.exports = function (webpackEnv) {
299299 // if there are any conflicts. This matches Node resolution mechanism.
300300 // https://github.com/facebook/create-react-app/issues/253
301301 modules : [ "node_modules" , paths . appNodeModules ] . concat (
302- modules . additionalModulePaths || [ ]
302+ modules . additionalModulePaths || [ ] ,
303303 ) ,
304304 fallback : {
305305 path : false ,
@@ -344,6 +344,12 @@ module.exports = function (webpackEnv) {
344344 module : {
345345 strictExportPresence : true ,
346346 rules : [
347+ {
348+ test : / \. m ? j s / ,
349+ resolve : {
350+ fullySpecified : false ,
351+ } ,
352+ } ,
347353 // Handle node_modules packages that contain sourcemaps
348354 shouldUseSourceMap && {
349355 enforce : "pre" ,
@@ -414,7 +420,7 @@ module.exports = function (webpackEnv) {
414420 loader : require . resolve ( "babel-loader" ) ,
415421 options : {
416422 customize : require . resolve (
417- "babel-preset-react-app/webpack-overrides"
423+ "babel-preset-react-app/webpack-overrides" ,
418424 ) ,
419425 presets : [
420426 [
@@ -522,7 +528,7 @@ module.exports = function (webpackEnv) {
522528 mode : "icss" ,
523529 } ,
524530 } ,
525- "sass-loader"
531+ "sass-loader" ,
526532 ) ,
527533 // Don't consider CSS imports dead code even if the
528534 // containing package claims to have no side effects.
@@ -545,7 +551,7 @@ module.exports = function (webpackEnv) {
545551 getLocalIdent : getCSSModuleLocalIdent ,
546552 } ,
547553 } ,
548- "sass-loader"
554+ "sass-loader" ,
549555 ) ,
550556 } ,
551557 // "file" loader makes sure those assets get served by WebpackDevServer.
@@ -591,8 +597,8 @@ module.exports = function (webpackEnv) {
591597 minifyURLs : true ,
592598 } ,
593599 }
594- : undefined
595- )
600+ : undefined ,
601+ ) ,
596602 ) ,
597603 // Inlines the webpack runtime script. This script is too small to warrant
598604 // a network request.
@@ -648,7 +654,7 @@ module.exports = function (webpackEnv) {
648654 return manifest ;
649655 } , seed ) ;
650656 const entrypointFiles = entrypoints . main . filter (
651- ( fileName ) => ! fileName . endsWith ( ".map" )
657+ ( fileName ) => ! fileName . endsWith ( ".map" ) ,
652658 ) ;
653659
654660 return {
@@ -738,7 +744,7 @@ module.exports = function (webpackEnv) {
738744 cache : true ,
739745 cacheLocation : path . resolve (
740746 paths . appNodeModules ,
741- ".cache/.eslintcache"
747+ ".cache/.eslintcache" ,
742748 ) ,
743749 // ESLint class options
744750 cwd : paths . appPath ,
0 commit comments