Skip to content

Commit

Permalink
VitePluginHtmlEnv
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasKarz committed Jan 23, 2023
1 parent a154222 commit 2e3d7e4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Starter template based on [Vite](https://vitejs.dev/guide/) with a small boilerp
> React Router enables _client side routing_. Client side routing allows your app to update the URL from a link click without making another request for another document from the server.
> There is a [good intrudoction](https://www.youtube.com/watch?v=Ul3y1LXxzdU) on YouTube.
#### [React Hooks](https://reactjs.org/docs/hooks-intro.html)
#### [usehooks-ts](https://usehooks-ts.com/)

> Hooks are a new addition in React 16.8. They let you use state and other React features without writing a class.
>
Expand All @@ -44,6 +44,8 @@ Starter template based on [Vite](https://vitejs.dev/guide/) with a small boilerp

> Over 100,000 open source vector icons as a React Component.
### [vite-plugin-html-env](https://github.com/lxs24sxl/vite-plugin-html-env)

## Tips

### VS Code extensions
Expand Down Expand Up @@ -77,6 +79,8 @@ yarn add flowbite flowbite-react
yarn add --dev @iconify/react
yarn add usehooks-ts
yarn add vite-plugin-html-env -D
```

### src/index.css
Expand Down
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/assets/react.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>React Template</title>
<title>
<{VITE_WEBSITE_NAME}>
</title>
<description></description>
<keywords></keywords>
<meta name="author" content="John Doe">
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"postcss": "^8.4.21",
"tailwindcss": "^3.2.4",
"typescript": "^4.9.3",
"vite": "^4.0.0"
"vite": "^4.0.0",
"vite-plugin-html-env": "^1.2.7"
}
}
3 changes: 2 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import svgr from 'vite-plugin-svgr';
import VitePluginHtmlEnv from 'vite-plugin-html-env';

// https://vitejs.dev/config/
export default defineConfig({
plugins: [svgr(), react()],
plugins: [svgr(), react(), VitePluginHtmlEnv()],
});

0 comments on commit 2e3d7e4

Please sign in to comment.