Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve dependency issues in v5 alpha #11294

Merged
merged 3 commits into from
Sep 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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