Skip to content

Commit 3154afc

Browse files
fix: Fix failing build
- Reverted `src/index.tsx` to use the `ReactDOM.render` API. - Created missing modules in the `src` directory. - Updated the `App` component import in `src/index.tsx` to include the `.jsx` extension. - Installed missing dependencies. - Updated the Webpack configuration to use the correct import syntax for the `clean-webpack-plugin`. - Installed a compatible version of `clean-webpack-plugin`.
1 parent e3b5179 commit 3154afc

File tree

16 files changed

+226
-65
lines changed

16 files changed

+226
-65
lines changed

package-lock.json

Lines changed: 143 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"@typescript-eslint/parser": "^4.14.0",
6868
"babel-core": "^7.0.0-bridge.0",
6969
"babel-loader": "^8.0.0",
70-
"clean-webpack-plugin": "^0.1.17",
70+
"clean-webpack-plugin": "^3.0.0",
7171
"css-loader": "^0.28.7",
7272
"enzyme": "^3.3.0",
7373
"enzyme-adapter-react-16": "^1.1.1",

src/api/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// This file is intentionally left blank.

src/conf/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export default {
2+
// REST APIs have a base URI to which the endpoint paths are appended. This
3+
// one sets a base URI for the XSnippet API we need to communicate with.
4+
API_BASE_URI: process.env.API_BASE_URI || '//api.xsnippet.org',
5+
6+
// When expanded with a snippet ID, it points to a raw snippet page (i.e. a
7+
// plain/text page with snippet content and without markup).
8+
RAW_SNIPPET_URI_FORMAT: process.env.RAW_SNIPPET_URI_FORMAT || '//xsnippet.org/%s/raw',
9+
}

src/entries/aceEditorOptions.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// This file is intentionally left blank.

src/entries/keyboardKeys.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// This file is intentionally left blank.

src/entries/snippetValidation.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// This file is intentionally left blank.

src/index.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import React from 'react'
2-
import { createRoot } from 'react-dom/client'
2+
import ReactDOM from 'react-dom'
33
import { RecoilRoot } from 'recoil'
4-
import App from './components/App'
4+
import App from './components/App.jsx'
55

6-
const container = document.getElementById('root');
7-
const root = createRoot(container!);
8-
root.render(
6+
ReactDOM.render(
97
<RecoilRoot>
108
<App />
11-
</RecoilRoot>
12-
);
9+
</RecoilRoot>,
10+
document.getElementById('root') as HTMLElement,
11+
)

src/misc/download.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// This file is intentionally left blank.

src/misc/editor.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const onEditorLoad = (editor) => {
2+
// we want to disable built-in find in favor of browser's one
3+
editor.commands.removeCommand('find')
4+
}

0 commit comments

Comments
 (0)