-
Notifications
You must be signed in to change notification settings - Fork 15
React tooling scaffold (migration 1/8) #689
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Angular 2 HN</title> | ||
| </head> | ||
| <body> | ||
| <div id="root"></div> | ||
| <script type="module" src="/src-react/main.tsx"></script> | ||
| </body> | ||
| </html> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,10 @@ | |
| "build": "ng build", | ||
| "test": "ng test", | ||
| "lint": "ng lint", | ||
| "e2e": "ng e2e" | ||
| "e2e": "ng e2e", | ||
| "react:dev": "vite", | ||
| "react:build": "tsc -p tsconfig.react.json && vite build", | ||
| "react:preview": "vite preview" | ||
| }, | ||
| "private": true, | ||
| "dependencies": { | ||
|
|
@@ -21,6 +24,9 @@ | |
| "@angular/router": "~9.0.1", | ||
| "@angular/service-worker": "~9.0.1", | ||
| "node-fetch": "^2.6.0", | ||
| "react": "^18.3.1", | ||
| "react-dom": "^18.3.1", | ||
| "react-router-dom": "^6.26.2", | ||
| "rxjs": "~6.5.4", | ||
| "rxjs-compat": "^6.5.2", | ||
| "tslib": "^1.10.0", | ||
|
|
@@ -35,6 +41,9 @@ | |
| "@types/jasmine": "~3.3.8", | ||
| "@types/jasminewd2": "~2.0.3", | ||
| "@types/node": "^12.11.1", | ||
| "@types/react": "^18.3.5", | ||
| "@types/react-dom": "^18.3.0", | ||
| "@vitejs/plugin-react": "^4.3.1", | ||
| "codelyzer": "^5.1.2", | ||
| "jasmine-core": "~3.4.0", | ||
| "jasmine-spec-reporter": "~4.2.1", | ||
|
|
@@ -44,9 +53,11 @@ | |
| "karma-jasmine": "~2.0.1", | ||
| "karma-jasmine-html-reporter": "^1.4.0", | ||
| "protractor": "~5.4.0", | ||
| "sass": "^1.77.8", | ||
| "ts-node": "~7.0.0", | ||
| "tslint": "~5.15.0", | ||
| "typescript": "~3.7.5" | ||
| "typescript": "~5.4.5", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 TypeScript bump to 5.4.5 breaks the Angular build Raising the shared Prompt for agentsWas this helpful? React with 👍 or 👎 to provide feedback. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Confirmed on the version ranges — Angular 9's
What "coexist" buys here is that the Angular source stays in place as the reference for each port, which it does. Called out to the requester in case they'd rather have a working |
||
| "vite": "^5.4.8" | ||
| }, | ||
| "prettier": { | ||
| "trailingComma": "es5", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| function App() { | ||
| return <h1>Angular 2 HN — React migration in progress</h1>; | ||
| } | ||
|
|
||
| export default App; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| import { StrictMode } from 'react'; | ||
| import { createRoot } from 'react-dom/client'; | ||
|
|
||
| import App from './App'; | ||
|
|
||
| createRoot(document.getElementById('root')!).render( | ||
| <StrictMode> | ||
| <App /> | ||
| </StrictMode>, | ||
| ); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "target": "ES2020", | ||
| "lib": ["DOM", "DOM.Iterable", "ES2020"], | ||
| "module": "ESNext", | ||
| "moduleResolution": "bundler", | ||
| "jsx": "react-jsx", | ||
| "strict": true, | ||
| "noEmit": true, | ||
| "isolatedModules": true, | ||
| "skipLibCheck": true, | ||
| "resolveJsonModule": true, | ||
| "types": ["vite/client"] | ||
| }, | ||
| "include": ["src-react", "vite.config.ts"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import { defineConfig } from 'vite'; | ||
| import react from '@vitejs/plugin-react'; | ||
|
|
||
| export default defineConfig({ | ||
| plugins: [react()], | ||
| publicDir: 'public', | ||
| build: { | ||
| outDir: 'dist/react', | ||
| emptyOutDir: true, | ||
| }, | ||
| server: { | ||
| port: 3000, | ||
| }, | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 angular.json references non-existent src/manifest.webmanifest
The build and test asset lists still reference
src/manifest.webmanifest, which does not exist in the repo and was already absent at the base commit. Pre-existing and not introduced here, but the Angular build's asset copy step will fail on it regardless.Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed on both counts — it's dangling at the base commit (the real file is
src/manifest.json, which this PR moved topublic/and repointed). Since the wholeangular.jsonasset list is deleted in PR8, I'm leaving the stale entry rather than fixing an Angular config on its way out.