-
Notifications
You must be signed in to change notification settings - Fork 318
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(build system): add React tests for loadtest 2 #3755
Merged
Merged
Changes from all commits
Commits
Show all changes
112 commits
Select commit
Hold shift + click to select a range
8496a72
test(build system):setup env
0618 3f0cc3a
test(build system): add cra-template-react-js
0618 b098755
test(build system): add script/create-react-app
0618 49b2395
test(build system): add script/create-react-app args
0618 ae82631
test(build system): create template folder
0618 de53be0
test(build system): create template components
0618 3d00368
test(build system): mega-apps folder
0618 94265c3
test(build system): add react-16-cra-5-js
0618 5bf4ae3
test(build system): dynamically create react16 and 18 js
0618 c3c4504
test(build system): refactor create-react-app script
0618 ee45b9c
test(build system): create-react-app to create react 16 ts
0618 aa60f6f
test(build system): rename cra-template-react
0618 a487d7b
test(build system): cleanup template/src
0618 549a6fb
test(build system): create mega-apps folder
0618 5fef867
test(build system): rename pkgManager
0618 4a7a938
PoC: add mega app canary workflow
0618 8cefbb6
PoC: add mega app canary workflow trigger
0618 1a0f1cf
revert to build-and-runtime-test
0618 1bdddf0
use personal amplify app
0618 6873c9b
use personal amplify app
0618 537095f
use personal amplify app
0618 37ec22a
change mega-apps-test trigger by push
0618 46863a2
change amplify pull envName
0618 f32b9eb
remove unnecessary steps
0618 a0b5b1d
try building mega-app
0618 c4794d5
fix amplify pull
0618 0ea4f84
install esbuild-register
0618 aef0207
install esbuild-register
0618 a22fb8f
fix working-dir
0618 d0c9ba5
log current dir
0618 c2ec45f
log dir
0618 069a5ec
add pull env script
0618 9b9d571
fix pull env script
0618 ea4ab4a
add create-react-app
0618 9a7e5ce
throw cra err
0618 688f6f9
set TS version to 4
0618 9e2ec8e
add all cra apps
0618 d68287f
fix stderr
0618 bb48084
make nodeJS and npm/yarn dynamic
0618 55471b5
add node and package params
0618 41d10cf
use multi-dimension matrix
0618 8fd7bee
fix matrix
0618 d450b3f
react use include
0618 c5ea445
Revert "react use include"
0618 5b5fbe7
rename mega-app-tests to mega-app-tests-cra
0618 8e1f6f4
test(build system): use default CRA
0618 a6314ce
test(build system): use default CRA fix working-dir
0618 8503afc
test(build system): add MEGA_APP_NAME and ts
0618 64f973e
test(build system): add ts and 16
0618 e7ae2d8
test(build system): add react 16
0618 63be58b
test(build system): fix typescript
0618 add5e00
test(build system): fix typescript
0618 3603565
test(build system): change 18 to latest and remove App.tsx
0618 dfbc9ee
test(build system): add GH workflow matrix include to reduce the numb…
0618 2ad6fe9
test(build system): add mega-app name to step
0618 aab93af
test(build system): clean up cra template
0618 16b9809
test(build system): add account-setting component
0618 601d138
test(build system): add next11 megaapp
0618 e149c7b
test(build system): move CRA toGH matrix include
0618 825084e
test(build system): add next
0618 483007a
test(build system): add next latest mega-app
0618 a95adab
test(build system): add next 11 mega-app
0618 6222e9c
test(build system): add next 11 mega-app exclude node 18
0618 89169e4
test(build system): fix gatsby
0618 8af6262
test(build system): add vite latest mega-app
0618 eaeca4e
test(build system): add vite 2 mega-app
0618 40e1ea6
test(build system): rename mega-app-tests workflow and cleanup
0618 4498428
test(build system): cleanup custom template script
0618 9d008c6
test(build system): add node version to app names
0618 346309b
test(build system): remove react-16-cra-5-node-16-ts
0618 2ce99b8
test(build system): remove environment
0618 40a4c96
test(build system): add storageManager and deleteUser
0618 d890948
test(build system): set yarn version
0618 e1d6e90
test(build system): remove pkg.json and yarn.lock
0618 2ffed94
test(build system): add gatsby comment
0618 bb82b25
test(build system): run test every 15 min
0618 ba89b5d
test(build system): rename build system
0618 9c1f0f6
test(build system): add comments
0618 57f96fd
test(build system): revert canary package.json
0618 a18e62f
test(build system): GH workflow action use commit hash
0618 bf0c576
Merge branch 'mega-app-canary' into mega-app-canary-react
0618 5b6bd75
test(build system): change schecule time
0618 818a822
Update .github/workflows/build-system-test-react.yml
0618 6813234
test(build system): change GH workflow hash, next pkg template
0618 f58003a
test(build system): remove handleSuccess
0618 f7b85b2
Merge branch 'mega-app-canary' into mega-app-canary-react
0618 28e260a
test(build system): add create-mega-app script
0618 5980a04
test(build system): add copy-mega-app-files script
0618 e0030b6
test(build system): add install and build script
0618 5f8f02b
Merge branch 'mega-app-canary' into mega-app-canary-react
0618 df2f057
test(build system): change shell formatter
0618 3b8c871
test(build system): add comments and misc changes
0618 e8516b7
test(build system): remove gatsby
0618 ce15ddf
Merge branch 'mega-app-canary' into mega-app-canary-react
0618 d977d5c
test(build system): set yarn version to 1
0618 42fbf13
Merge branch 'mega-app-canary' into mega-app-canary-react
0618 00f3cc2
test(build system): move build-tools to matrix
0618 6848a58
Merge branch 'mega-app-canary' into mega-app-canary-react
0618 445a021
Merge branch 'main' into mega-app-canary-react
0618 9c6662a
test(build system): add angular app and template
0618 44b2e08
test(build system): remove install-with-retries
0618 86ea30a
Merge branch 'mega-app-canary' into mega-app-canary-react
0618 16b8f00
Merge branch 'main' into mega-app-canary-react
0618 578fbea
Revert "test(build system): add angular app and template"
0618 223e7a2
test(build system): fix install build build-tool-version
0618 4433be9
test(build system): fix install-build path
0618 ac7253d
test(build system): echo log
0618 49ddde9
test(build system): reaname build system test
0618 8a10691
test(build system): add merge to main trigger
0618 6a010a1
test(build system): log data to BuildSystemTestFailure metric
0618 590593a
fix: add permission to aws credential
0618 fa9166e
Merge branch 'main' into mega-app-canary-react
0618 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
|
||
echo "cd build-system-tests" | ||
cd build-system-tests | ||
if [ "$BUILD_TOOL" == 'cra' ]; then | ||
echo "cp templates/template-aws-exports.js mega-apps/${MEGA_APP_NAME}/src/aws-exports.js" | ||
cp templates/template-aws-exports.js mega-apps/${MEGA_APP_NAME}/src/aws-exports.js | ||
if [ "$LANGUAGE" == 'js' ]; then | ||
echo "cp templates/components/react/cra/App.js mega-apps/${MEGA_APP_NAME}/src/App.js" | ||
cp templates/components/react/cra/App.js mega-apps/${MEGA_APP_NAME}/src/App.js | ||
else | ||
echo "cp templates/components/react/cra/App.js mega-apps/${MEGA_APP_NAME}/src/App.tsx" | ||
cp templates/components/react/cra/App.js mega-apps/${MEGA_APP_NAME}/src/App.tsx | ||
if [ "$FRAMEWORK_VERSION" == '16' ]; then | ||
# We have to customize the index.tsx file for React 16 because the render API changed since React 18. | ||
# See more: https://legacy.reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html | ||
echo "cp templates/components/react/cra/index-react-${FRAMEWORK_VERSION}.js mega-apps/${MEGA_APP_NAME}/src/index.tsx" | ||
cp templates/components/react/cra/index-react-${FRAMEWORK_VERSION}.js mega-apps/${MEGA_APP_NAME}/src/index.tsx | ||
fi | ||
fi | ||
fi | ||
|
||
if [ "$BUILD_TOOL" == 'next' ]; then | ||
echo "mkdir mega-apps/${MEGA_APP_NAME}/data" | ||
mkdir mega-apps/${MEGA_APP_NAME}/data | ||
echo "cp templates/template-aws-exports.js mega-apps/${MEGA_APP_NAME}/data/aws-exports.js" | ||
cp templates/template-aws-exports.js mega-apps/${MEGA_APP_NAME}/data/aws-exports.js | ||
echo "cp templates/components/react/next/App.js mega-apps/${MEGA_APP_NAME}/pages/index.tsx" | ||
cp templates/components/react/next/App.js mega-apps/${MEGA_APP_NAME}/pages/index.tsx | ||
if [ "$BUILD_TOOL_VERSION" == '11' ]; then | ||
# We have to customize the package.json and tsconfig.json for Next.js 11, | ||
# because create-next-app only creates the app with the latest version | ||
echo "cp templates/components/react/next/template-package-${BUILD_TOOL_VERSION}.json mega-apps/${MEGA_APP_NAME}/package.json" | ||
cp templates/components/react/next/template-package-${BUILD_TOOL_VERSION}.json mega-apps/${MEGA_APP_NAME}/package.json | ||
echo "cp templates/components/react/next/template-tsconfig-${BUILD_TOOL_VERSION}.json mega-apps/${MEGA_APP_NAME}/tsconfig.json" | ||
cp templates/components/react/next/template-tsconfig-${BUILD_TOOL_VERSION}.json mega-apps/${MEGA_APP_NAME}/tsconfig.json | ||
fi | ||
fi | ||
|
||
if [ "$BUILD_TOOL" == 'vite' ]; then | ||
echo "cp templates/template-aws-exports.js mega-apps/${MEGA_APP_NAME}/src/aws-exports.js" | ||
cp templates/template-aws-exports.js mega-apps/${MEGA_APP_NAME}/src/aws-exports.js | ||
echo "cp templates/components/react/cra/App.js mega-apps/${MEGA_APP_NAME}/src/App.tsx" | ||
cp templates/components/react/cra/App.js mega-apps/${MEGA_APP_NAME}/src/App.tsx | ||
echo "cp templates/components/react/vite/index.html mega-apps/${MEGA_APP_NAME}/index.html" | ||
cp templates/components/react/vite/index.html mega-apps/${MEGA_APP_NAME}/index.html | ||
echo "cp templates/components/react/vite/template-tsconfig.json mega-apps/${MEGA_APP_NAME}/tsconfig.json" | ||
cp templates/components/react/vite/template-tsconfig.json mega-apps/${MEGA_APP_NAME}/tsconfig.json | ||
echo "cp templates/components/react/vite/vite.config.ts mega-apps/${MEGA_APP_NAME}/vite.config.ts" | ||
cp templates/components/react/vite/vite.config.ts mega-apps/${MEGA_APP_NAME}/vite.config.ts | ||
fi |
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,28 @@ | ||
#!/bin/bash | ||
|
||
echo "cd build-system-tests" | ||
cd build-system-tests | ||
echo "mkdir -p mega-apps/" | ||
mkdir -p mega-apps/ | ||
echo "cd mega-apps" | ||
cd mega-apps | ||
|
||
if [[ "$BUILD_TOOL" == 'cra' && "$LANGUAGE" == 'js' ]]; then | ||
echo "npx create-react-app ${MEGA_APP_NAME}" | ||
npx create-react-app ${MEGA_APP_NAME} | ||
fi | ||
|
||
if [[ "$BUILD_TOOL" == 'cra' && "$LANGUAGE" == 'ts' ]]; then | ||
echo "npx create-react-app ${MEGA_APP_NAME} --template typescript" | ||
npx create-react-app ${MEGA_APP_NAME} --template typescript | ||
fi | ||
|
||
if [ "$BUILD_TOOL" == 'next' ]; then | ||
echo "npx create-next-app ${MEGA_APP_NAME} --ts --no-src-dir --no-experimental-app --no-eslint" | ||
npx create-next-app ${MEGA_APP_NAME} --ts --no-src-dir --no-experimental-app --no-eslint | ||
fi | ||
|
||
if [ "$BUILD_TOOL" == 'vite' ]; then | ||
echo "npm create vite@${BUILD_TOOL_VERSION} $MEGA_APP_NAME -- --template react-ts" | ||
npm create vite@${BUILD_TOOL_VERSION} $MEGA_APP_NAME -- --template react-ts | ||
fi |
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,37 @@ | ||
#!/bin/bash | ||
|
||
echo "cd build-system-tests/mega-apps/${MEGA_APP_NAME}" | ||
cd build-system-tests/mega-apps/${MEGA_APP_NAME} | ||
if [ "$PKG_MANAGER" == 'yarn' ]; then | ||
echo "yarn version" | ||
yarn -v | ||
echo "yarn set version $PKG_MANAGER_VERSION" | ||
yarn set version $PKG_MANAGER_VERSION | ||
echo "yarn version" | ||
yarn -v | ||
if [[ "$BUILD_TOOL" == 'cra' && "$LANGUAGE" == 'ts' ]]; then | ||
echo "yarn add $DEP_TYPES" | ||
yarn add $DEP_TYPES | ||
fi | ||
echo "yarn add $DEPENDENCIES" | ||
yarn add $DEPENDENCIES | ||
echo "yarn build" | ||
yarn build | ||
else | ||
if [[ "$BUILD_TOOL" == 'cra' && "$LANGUAGE" == 'ts' ]]; then | ||
# If not testing the latest React, we need to download its types. | ||
# CRA is the only framework that we test React 16. | ||
echo "npm install $DEP_TYPES" | ||
npm install $DEP_TYPES | ||
fi | ||
if [[ "$BUILD_TOOL" == 'next' && "$BUILD_TOOL_VERSION" == '11' ]]; then | ||
# We have to remove the initial downloaded node_modules for Next.js 11, | ||
# because create-next-app only creates the app with the latest version | ||
echo "rm -rf node_modules" | ||
rm -rf node_modules | ||
fi | ||
echo "npm install $DEPENDENCIES" | ||
npm install $DEPENDENCIES | ||
echo "npm run build" | ||
npm run build | ||
fi |
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,148 @@ | ||
# Description: this workflow runs build mega-apps that have all the connected components. | ||
|
||
name: Build System Test Canary | ||
|
||
permissions: | ||
id-token: write # This is required for aws-actions/configure-aws-credentials | ||
|
||
on: | ||
schedule: | ||
- cron: '*/15 * * * *' # Run every 15 minutes | ||
push: | ||
branches: [main] # Run when merge to main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: ci | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
framework: [react] | ||
framework-version: [latest] | ||
build-tool: [cra, next, vite] | ||
build-tool-version: [latest] | ||
pkg-manager: [npm] | ||
language: [ts] | ||
node-version: [18] | ||
include: | ||
- framework: react | ||
framework-version: latest | ||
build-tool: cra | ||
build-tool-version: latest | ||
pkg-manager: npm | ||
language: ts | ||
node-version: 16 | ||
- framework: react | ||
framework-version: 16 | ||
build-tool: cra | ||
build-tool-version: latest | ||
pkg-manager: npm | ||
language: ts | ||
node-version: 18 | ||
- framework: react | ||
framework-version: latest | ||
build-tool: cra | ||
build-tool-version: latest | ||
pkg-manager: npm | ||
language: js | ||
node-version: 18 | ||
- framework: react | ||
framework-version: latest | ||
build-tool: cra | ||
build-tool-version: latest | ||
pkg-manager: yarn | ||
pkg-manager-version: 1 | ||
language: ts | ||
node-version: 18 | ||
- framework: react | ||
framework-version: 17 | ||
build-tool: next | ||
build-tool-version: 11 | ||
pkg-manager: npm | ||
language: ts | ||
node-version: 16 | ||
- framework: react | ||
framework-version: latest | ||
build-tool: vite | ||
build-tool-version: 2 | ||
pkg-manager: npm | ||
language: ts | ||
node-version: 18 | ||
|
||
env: | ||
MEGA_APP_NAME: ${{ matrix.framework }}-${{ matrix.framework-version }}-${{ matrix.build-tool }}-${{ matrix.build-tool-version }}-node-${{ matrix.node-version }}-${{ matrix.language }} | ||
DEPENDENCIES: react@${{ matrix.framework-version }} react-dom@${{ matrix.framework-version }} @aws-amplify/ui-react aws-amplify @aws-amplify/ui-react-storage | ||
DEP_TYPES: '@types/react@${{ matrix.framework-version }} @types/react-dom@${{ matrix.framework-version }}' | ||
|
||
steps: | ||
- name: Checkout Amplify UI | ||
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f | ||
with: | ||
persist-credentials: false | ||
- name: Setup Node.js ${{ matrix.node-version }} with ${{ matrix.pkg-manager }} | ||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 https://github.com/actions/setup-node/commit/64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: ${{ matrix.pkg-manager }} | ||
env: | ||
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 | ||
- name: Create MegaApp ${{ env.MEGA_APP_NAME }} | ||
run: ./.github/scripts/mega-app-create-app.sh | ||
shell: bash | ||
env: | ||
BUILD_TOOL: ${{ matrix.build-tool }} | ||
LANGUAGE: ${{ matrix.language }} | ||
MEGA_APP_NAME: ${{ env.MEGA_APP_NAME }} | ||
BUILD_TOOL_VERSION: ${{ matrix.build-tool-version }} | ||
- name: Copy aws_export and App.js | ||
run: ./.github/scripts/mega-app-copy-files.sh | ||
shell: bash | ||
env: | ||
BUILD_TOOL: ${{ matrix.build-tool }} | ||
LANGUAGE: ${{ matrix.language }} | ||
MEGA_APP_NAME: ${{ env.MEGA_APP_NAME }} | ||
BUILD_TOOL_VERSION: ${{ matrix.build-tool-version }} | ||
FRAMEWORK_VERSION: ${{ matrix.framework-version }} | ||
- name: Install Packages and Build | ||
run: ./.github/scripts/mega-app-install-build.sh | ||
shell: bash | ||
env: | ||
BUILD_TOOL: ${{ matrix.build-tool }} | ||
BUILD_TOOL_VERSION: ${{ matrix.build-tool-version }} | ||
LANGUAGE: ${{ matrix.language }} | ||
MEGA_APP_NAME: ${{ env.MEGA_APP_NAME }} | ||
PKG_MANAGER: ${{ matrix.pkg-manager }} | ||
PKG_MANAGER_VERSION: ${{ matrix.pkg-manager-version }} | ||
DEPENDENCIES: ${{ env.DEPENDENCIES }} | ||
DEP_TYPES: ${{ env.DEP_TYPES }} | ||
|
||
log-failure-metric: | ||
# Send a failure data point to metric BuildSystemTestFailure in github-workflows@ us-east-2 | ||
runs-on: ubuntu-latest | ||
environment: ci | ||
needs: build | ||
if: ${{ failure() }} | ||
steps: | ||
- name: Log failure data point to metric BuildSystemTestFailure | ||
uses: aws-amplify/amplify-ui/.github/actions/log-metric@main | ||
with: | ||
metric-name: BuildSystemTestFailure | ||
value: 1 | ||
role-to-assume: ${{ secrets.METRIC_LOGGER_ROLE_ARN }} | ||
aws-region: us-east-2 | ||
|
||
log-success-metric: | ||
# Send a success data point to metric BuildSystemTestFailure in github-workflows@ us-east-2 | ||
runs-on: ubuntu-latest | ||
environment: ci | ||
needs: build | ||
if: ${{ success() }} | ||
steps: | ||
- name: Log success data point to metric BuildSystemTestFailure | ||
uses: aws-amplify/amplify-ui/.github/actions/log-metric@main | ||
with: | ||
metric-name: BuildSystemTestFailure | ||
value: 0 | ||
role-to-assume: ${{ secrets.METRIC_LOGGER_ROLE_ARN }} | ||
aws-region: us-east-2 |
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
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 @@ | ||
mega-apps |
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,51 @@ | ||
import React, { useEffect } from 'react'; | ||
import { Amplify, Notifications } from 'aws-amplify'; | ||
import { | ||
AccountSettings, | ||
Authenticator, | ||
FileUploader, | ||
MapView, | ||
Text, | ||
InAppMessagingProvider, | ||
InAppMessageDisplay, | ||
} from '@aws-amplify/ui-react'; | ||
import { StorageManager } from '@aws-amplify/ui-react-storage'; | ||
import '@aws-amplify/ui-react/styles.css'; | ||
import awsconfig from './aws-exports'; | ||
Amplify.configure(awsconfig); | ||
|
||
const { InAppMessaging } = Notifications; | ||
|
||
export default function Home() { | ||
useEffect(() => { | ||
// sync remote in-app messages | ||
InAppMessaging.syncMessages(); | ||
}, []); | ||
|
||
return ( | ||
<> | ||
<InAppMessagingProvider> | ||
<InAppMessageDisplay /> | ||
<Text>In-App Messaging Example</Text> | ||
</InAppMessagingProvider> | ||
<FileUploader acceptedFileTypes={['image/*']} accessLevel="public" /> | ||
<Authenticator> | ||
{({ signOut, user = { username: '' } }) => ( | ||
<main> | ||
<h1>Hello {user.username}</h1> | ||
<button onClick={signOut}>Sign out</button> | ||
</main> | ||
)} | ||
</Authenticator> | ||
<AccountSettings.ChangePassword onSuccess={() => {}} /> | ||
<AccountSettings.DeleteUser onSuccess={() => {}} /> | ||
<StorageManager | ||
acceptedFileTypes={['image/*']} | ||
accessLevel="public" | ||
maxFileCount={1} | ||
isResumable | ||
/> | ||
<MapView /> | ||
</> | ||
); | ||
} |
10 changes: 10 additions & 0 deletions
10
build-system-tests/templates/components/react/cra/index-react-16.js
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,10 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import App from './App'; | ||
|
||
ReactDOM.render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
document.getElementById('root') | ||
); |
10 changes: 10 additions & 0 deletions
10
build-system-tests/templates/components/react/cra/index-react-18.js
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,10 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom/client'; | ||
import App from './App'; | ||
|
||
const root = ReactDOM.createRoot(document.getElementById('root')); | ||
root.render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
); |
13 changes: 13 additions & 0 deletions
13
build-system-tests/templates/components/react/cra/index-react-18.tsx
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,13 @@ | ||
// @ts-nocheck | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom/client'; | ||
import App from './App'; | ||
|
||
const root = ReactDOM.createRoot( | ||
document.getElementById('root') as HTMLElement | ||
); | ||
root.render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
L5 and L6 is the only difference from #3703