Skip to content

Commit

Permalink
chore: improved example
Browse files Browse the repository at this point in the history
  • Loading branch information
subzero10 committed Apr 8, 2024
1 parent 169300f commit faa291b
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const hbOptions = {

esbuild
.build({
entryPoints: ['src/app.tsx'],
entryPoints: ['src/index.tsx'],
bundle: true,
minify: true,
format: 'cjs',
Expand Down
11 changes: 11 additions & 0 deletions packages/esbuild-plugin/examples/react-typescript/src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import * as React from 'react'
import Panel from './Panel'

// App Component
export default function App() {
return (<div>
<h1>Hello, ESBUILD!</h1>
<Panel/>
<Panel/>
</div>)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as React from 'react'

export default function Panel() {
return (
<h2>I'm a Panel</h2>
)
}
18 changes: 0 additions & 18 deletions packages/esbuild-plugin/examples/react-typescript/src/app.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as ReactDOM from 'react-dom/client'
import App from './App'

const root = ReactDOM.createRoot(
document.getElementById('root')
)
root.render(<App />)

0 comments on commit faa291b

Please sign in to comment.