Skip to content

Commit

Permalink
Resolve dependency issues in v5 alpha (#11294)
Browse files Browse the repository at this point in the history
merceyz authored Sep 22, 2021

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
1 parent b45ae3c commit 134cd3c
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
@@ -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.
@@ -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
@@ -364,7 +367,7 @@ module.exports = function (webpackEnv) {
test: /\.svg$/,
use: [
{
loader: '@svgr/webpack',
loader: require.resolve('@svgr/webpack'),
options: {
prettier: false,
svgo: false,
@@ -376,7 +379,7 @@ module.exports = function (webpackEnv) {
},
},
{
loader: 'file-loader',
loader: require.resolve('file-loader'),
options: {
name: 'static/media/[name].[hash].[ext]',
},
1 change: 1 addition & 0 deletions packages/react-scripts/package.json
Original file line number Diff line number Diff line change
@@ -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",

0 comments on commit 134cd3c

Please sign in to comment.