Astro
Installation guide for Astro.
Create project
Run the create astro
command to create a new React project.
Walk through the prompts and choose the options you want.
Create .css
file
Create a new file named src/styles/global.css
with the following code:
Import the global.css
file
Import the global.css
file in your src/pages/index.astro
file:
Disable appBaseStyles
To prevent serving the Tailwind base styles twice, we need to tell Astro not to apply the base styles, since we already include them in our own globals.css
file.
To do this, set the applyBaseStyles
config option for the tailwind plugin in astro.config.mjs
to false
.
Update tsconfig.json
Add the baseUrl
and paths
properties to the compilerOptions
section of the tsconfig.json
file:
That's it!
You can now start adding components or hooks to your project.
The command will install the Button
component to your project. And you can import it in your code.