-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: change react to preact to decrease bundle size and improve app …
…performance
- Loading branch information
Victor Fernandes
committed
Jan 9, 2024
1 parent
9df5886
commit a448501
Showing
7 changed files
with
316 additions
and
218 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,10 +1,5 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom/client'; | ||
import { render } from 'preact'; | ||
import App from './App.tsx'; | ||
import './index.css'; | ||
|
||
ReactDOM.createRoot(document.getElementById('root')!).render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
) | ||
render(<App />, document.getElementById('root')!); |
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react'; | ||
import preact from '@preact/preset-vite'; | ||
import { crx } from '@crxjs/vite-plugin'; | ||
import manifest from './manifest.json' | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
react(), | ||
preact(), | ||
crx({ manifest }), | ||
], | ||
}) |