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

test(integrations): switch react-scripts to webpack #8329

Merged
merged 5 commits into from
Nov 24, 2024
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
1 change: 0 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"node",
"react",
"react-dom",
"react-scripts",
"tsup",
"typescript",
"typescript47",
Expand Down
42 changes: 0 additions & 42 deletions .pnpmfile.cjs

This file was deleted.

9 changes: 0 additions & 9 deletions integrations/react-cra4/.eslintrc.cjs

This file was deleted.

23 changes: 0 additions & 23 deletions integrations/react-cra4/.gitignore

This file was deleted.

29 changes: 0 additions & 29 deletions integrations/react-cra4/package.json

This file was deleted.

1 change: 0 additions & 1 deletion integrations/react-cra4/src/react-app-env.d.ts

This file was deleted.

20 changes: 0 additions & 20 deletions integrations/react-cra4/tsconfig.json

This file was deleted.

9 changes: 0 additions & 9 deletions integrations/react-cra5/.eslintrc.cjs

This file was deleted.

23 changes: 0 additions & 23 deletions integrations/react-cra5/.gitignore

This file was deleted.

29 changes: 0 additions & 29 deletions integrations/react-cra5/package.json

This file was deleted.

1 change: 0 additions & 1 deletion integrations/react-cra5/src/react-app-env.d.ts

This file was deleted.

20 changes: 0 additions & 20 deletions integrations/react-cra5/tsconfig.json

This file was deleted.

23 changes: 23 additions & 0 deletions integrations/react-webpack-4/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "react-webpack-4",
"private": true,
"scripts": {
"build": "cross-env NODE_OPTIONS=--openssl-legacy-provider webpack --mode production"
},
"dependencies": {
"@tanstack/react-query": "workspace:*",
"@tanstack/react-query-devtools": "workspace:*",
"react": "19.0.0-rc-4c2e457c7c-20240522",
"react-dom": "19.0.0-rc-4c2e457c7c-20240522"
},
"devDependencies": {
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@babel/preset-react": "^7.25.9",
"babel-loader": "^8.3.0",
"cross-env": "^7.0.3",
"html-webpack-plugin": "^4.5.2",
"webpack": "^4.44.2",
"webpack-cli": "^4.10.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>React App</title>
<meta charset="UTF-8" />
<title>react-webpack-4</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
24 changes: 24 additions & 0 deletions integrations/react-webpack-4/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const HtmlWebPackPlugin = require('html-webpack-plugin')

const htmlPlugin = new HtmlWebPackPlugin({
template: './public/index.html',
filename: './index.html',
})

module.exports = {
module: {
rules: [
{
test: /\.(?:js|mjs|cjs|jsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-react'],
},
},
},
],
},
plugins: [htmlPlugin],
}
22 changes: 22 additions & 0 deletions integrations/react-webpack-5/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "react-webpack-5",
"private": true,
"scripts": {
"build": "webpack --mode production"
},
"dependencies": {
"@tanstack/react-query": "workspace:*",
"@tanstack/react-query-devtools": "workspace:*",
"react": "19.0.0-rc-4c2e457c7c-20240522",
"react-dom": "19.0.0-rc-4c2e457c7c-20240522"
},
"devDependencies": {
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@babel/preset-react": "^7.25.9",
"babel-loader": "^9.2.1",
"html-webpack-plugin": "^5.6.3",
"webpack": "^5.96.1",
"webpack-cli": "^5.1.4"
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>React App</title>
<meta charset="UTF-8" />
<title>react-webpack-5</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
24 changes: 24 additions & 0 deletions integrations/react-webpack-5/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const HtmlWebPackPlugin = require('html-webpack-plugin')

const htmlPlugin = new HtmlWebPackPlugin({
template: './public/index.html',
filename: './index.html',
})

module.exports = {
module: {
rules: [
{
test: /\.(?:js|mjs|cjs|jsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-react'],
},
},
},
],
},
plugins: [htmlPlugin],
}
Loading
Loading