Skip to content

Commit

Permalink
refactor(rename): jx -> jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
virtuoushub committed Jul 11, 2022
1 parent d2e77b2 commit b0b0b72
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ module.exports = {
'packages/codemods/**/__testfixtures__/**/*',
'packages/core/config/storybook/**/*',
'packages/create-redwood-app/template/web/src/Routes.tsx',
'packages/web/src/entry/index.js', // TODO see why this is needed for React 18 ( "Parsing error: Unexpected token, expected "," (13:38)eslint")
],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
Expand Down Expand Up @@ -79,7 +78,7 @@ module.exports = {
},
// Entry.js rules
{
files: ['packages/web/src/entry/index.js'],
files: ['packages/web/src/entry/index.jsx'],
env: {
es6: true,
browser: true,
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/custom-web-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ if (rootElement.hasChildNodes()) {
}
```

This's actually the same file Redwood uses [internally](https://github.com/redwoodjs/redwood/blob/main/packages/web/src/entry/index.js).
This's actually the same file Redwood uses [internally](https://github.com/redwoodjs/redwood/blob/main/packages/web/src/entry/index.jsx).
So even if you don't customize anything, things still work the way they did.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const handler = async ({ force }) => {
path.join(
getPaths().base,
// NOTE we're copying over the index.js before babel transform
'node_modules/@redwoodjs/web/src/entry/index.js'
'node_modules/@redwoodjs/web/src/entry/index.jsx'
)
)
.toString()
Expand Down
8 changes: 4 additions & 4 deletions packages/core/config/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,13 @@ module.exports = (webpackEnv) => {
entry: {
/**
* Prerender requires a top-level component.
* Before we had `ReactDOM` and a top-level component in the same file (web/index.js).
* If index.js is defined in the user's project, use that, if not
* use the one provided in web/dist/entry/index.js
* Before we had `ReactDOM` and a top-level component in the same file (web/index.jsx).
* If index.jsx is defined in the user's project, use that, if not
* use the one provided in web/dist/entry/index.jsx
*/
app:
redwoodPaths.web.index ||
require.resolve('@redwoodjs/web/dist/entry/index.js'),
require.resolve('@redwoodjs/web/dist/entry/index.jsx'),
},
resolve: {
extensions: ['.wasm', '.mjs', '.js', '.jsx', '.ts', '.tsx', '.json'],
Expand Down
File renamed without changes.

0 comments on commit b0b0b72

Please sign in to comment.