Skip to content

Commit

Permalink
Resolve dependency issues in v5 alpha (facebook#11294)
Browse files Browse the repository at this point in the history
  • Loading branch information
merceyz authored and abhiisheek committed May 24, 2023
1 parent 6525db8 commit bc1cc8d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions packages/react-scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,12 @@ const reactRefreshWebpackPluginRuntimeEntry = require.resolve(
);
const babelRuntimeEntry = require.resolve('babel-preset-react-app');
const babelRuntimeEntryHelpers = require.resolve(
'@babel/runtime/helpers/esm/assertThisInitialized'
'@babel/runtime/helpers/esm/assertThisInitialized',
{ paths: [babelRuntimeEntry] }
);
const babelRuntimeRegenerator = require.resolve('@babel/runtime/regenerator');
const babelRuntimeRegenerator = require.resolve('@babel/runtime/regenerator', {
paths: [babelRuntimeEntry],
});

// Some apps do not need the benefits of saving a web request, so not inlining the chunk
// makes for a smoother build process.
Expand Down Expand Up @@ -329,7 +332,7 @@ module.exports = function (webpackEnv) {
enforce: 'pre',
exclude: /@babel(?:\/|\\{1,2})runtime/,
test: /\.(js|mjs|jsx|ts|tsx|css)$/,
use: 'source-map-loader',
loader: require.resolve('source-map-loader'),
},
{
// "oneOf" will traverse all following loaders until one will
Expand Down Expand Up @@ -364,7 +367,7 @@ module.exports = function (webpackEnv) {
test: /\.svg$/,
use: [
{
loader: '@svgr/webpack',
loader: require.resolve('@svgr/webpack'),
options: {
prettier: false,
svgo: false,
Expand All @@ -376,7 +379,7 @@ module.exports = function (webpackEnv) {
},
},
{
loader: 'file-loader',
loader: require.resolve('file-loader'),
options: {
name: 'static/media/[name].[hash].[ext]',
},
Expand Down
1 change: 1 addition & 0 deletions packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"semver": "7.3.5",
"source-map-loader": "^1.1.2",
"style-loader": "3.0.0",
"terser-webpack-plugin": "^5.1.4",
"webpack": "5.41.1",
"webpack-dev-server": "4.0.0",
"webpack-manifest-plugin": "3.1.1",
Expand Down

0 comments on commit bc1cc8d

Please sign in to comment.