From c644845d61c4d993ba5c07a0895ba5107f6baa9c Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sun, 21 Jan 2024 19:46:23 -0500 Subject: [PATCH] Integrate the editor from the old attempt into the new build. --- {old/src => src}/Editor.css | 0 {old/src => src}/Editor.tsx | 0 {old/src => src}/highlight.ts | 0 src/index.tsx | 3 ++- webpack.config.js | 3 +++ 5 files changed, 5 insertions(+), 1 deletion(-) rename {old/src => src}/Editor.css (100%) rename {old/src => src}/Editor.tsx (100%) rename {old/src => src}/highlight.ts (100%) diff --git a/old/src/Editor.css b/src/Editor.css similarity index 100% rename from old/src/Editor.css rename to src/Editor.css diff --git a/old/src/Editor.tsx b/src/Editor.tsx similarity index 100% rename from old/src/Editor.tsx rename to src/Editor.tsx diff --git a/old/src/highlight.ts b/src/highlight.ts similarity index 100% rename from old/src/highlight.ts rename to src/highlight.ts diff --git a/src/index.tsx b/src/index.tsx index 46b097b..47903d2 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,8 +1,9 @@ import React from "react"; import ReactDOM from "react-dom"; import init, { parse_org } from "../../organic/target/wasm32-unknown-unknown/js/wasm"; +import Editor from './Editor'; init().then(() => { console.log(parse_org("foo")); - ReactDOM.render(

Hello, world!

, document.getElementById("root")); + ReactDOM.render(<>

Hello, world!

, document.getElementById("root")); }); diff --git a/webpack.config.js b/webpack.config.js index 8eb1202..19abe40 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -42,4 +42,7 @@ module.exports = { experiments: { asyncWebAssembly: true }, + resolve: { + extensions: ['.tsx', '.ts', '.js'], + }, };