Here’s some step-by-step instructions on how to add a basic CSS setup to a Routify-powered project.
Install the postcss plugin:
npm i -D rollup-plugin-postcss
Import it inside rollup.config.js
:
import postcss from 'rollup-plugin-postcss'
Reference it as a plugin:
plugins: [
postcss(),
// ...other code
Import in main.js
:
import './css/style.css';
- Make sure to create the CSS folder under
src
- And create the CSS file
Now reference the correct file in __index.html
:
<link rel='stylesheet' href='/css/style.css'>
That’s it! We are thinking about shipping this as a default in Routify.
Chip in here if you want to contribute to the discussion.