Skip to content

Commit

Permalink
chore: switch CRA 4 to webpack 4
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlancollins committed Nov 24, 2024
1 parent 2588a08 commit fbe55f8
Show file tree
Hide file tree
Showing 11 changed files with 2,438 additions and 3,371 deletions.
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.

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": {
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@babel/preset-react": "^7.25.9",
"@tanstack/react-query": "workspace:*",
"@tanstack/react-query-devtools": "workspace:*",
"babel-loader": "^8.3.0",
"html-webpack-plugin": "^4.5.2",
"react": "19.0.0-rc-4c2e457c7c-20240522",
"react-dom": "19.0.0-rc-4c2e457c7c-20240522",
"webpack": "^4.44.2",
"webpack-cli": "^4.10.0"
},
"devDependencies": {
"cross-env": "^7.0.3"
}
}
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
File renamed without changes.
File renamed without changes.
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],
}
5,676 changes: 2,389 additions & 3,287 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

0 comments on commit fbe55f8

Please sign in to comment.