-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(integrations): switch react-scripts to webpack (#8329)
* chore: switch CRA 4 to webpack 4 * pnpm dedupe * test(integrations): switch CRA 5 to webpack 5 * Better dep vs devDep separation * Fix lockfile
- Loading branch information
1 parent
2588a08
commit b846c53
Showing
23 changed files
with
2,086 additions
and
7,435 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,6 @@ | |
"node", | ||
"react", | ||
"react-dom", | ||
"react-scripts", | ||
"tsup", | ||
"typescript", | ||
"typescript47", | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
integrations/react-cra4/public/index.html → ...rations/react-webpack-4/public/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
integrations/react-cra5/public/index.html → ...rations/react-webpack-5/public/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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], | ||
} |
Oops, something went wrong.