Skip to content
Draft
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
139 changes: 0 additions & 139 deletions App.css

This file was deleted.

25 changes: 0 additions & 25 deletions App.js

This file was deleted.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"build": "NODE_OPTIONS=--openssl-legacy-provider react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"postinstall": "node scripts/fix-postcss-exports.js"
},
"eslintConfig": {
"extends": [
Expand Down
12 changes: 12 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>React Schleifen</title>
</head>
<body>
<noscript>Diese App benötigt JavaScript.</noscript>
<div id="root"></div>
</body>
</html>
29 changes: 29 additions & 0 deletions scripts/fix-postcss-exports.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const fs = require('fs');
const path = require('path');

const targetPath = path.join(
__dirname,
'..',
'node_modules',
'postcss-safe-parser',
'node_modules',
'postcss',
'package.json',
);

if (!fs.existsSync(targetPath)) {
console.log('postcss package not found, skipping export patch.');
process.exit(0);
}

const packageJson = JSON.parse(fs.readFileSync(targetPath, 'utf8'));
const exportsField = packageJson.exports || {};

if (!exportsField['./lib/*']) {
exportsField['./lib/*'] = './lib/*.js';
packageJson.exports = exportsField;
fs.writeFileSync(targetPath, `${JSON.stringify(packageJson, null, 2)}\n`);
console.log('Added wildcard export to postcss for Node 20+/22+ compatibility.');
} else {
console.log('Wildcard export already present; no changes needed.');
}
Loading