Skip to content

Commit

Permalink
docs(vite): update steps, fix #550
Browse files Browse the repository at this point in the history
  • Loading branch information
redonkulus committed Dec 2, 2022
1 parent fdf19ee commit 1ab3c38
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions docs/integrations/vite.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ npm i atomizer-plugins -D
Create the `atomizer.config.js` config file so that Atomizer can find your source files.

```js
module.exports = {
export default {
content: [
'./index.html',
'./src/**/*.{vue,js,ts,jsx,tsx}',
Expand All @@ -49,7 +49,7 @@ import atomizerConfig from './atomizer.config.js';

const atomizerPlugin = vite({
config: atomizerConfig,
outfile: 'dist/atomizer.css',
outfile: 'atomizer.css',
});

export default defineConfig(() => {
Expand All @@ -64,7 +64,7 @@ export default defineConfig(() => {
Make sure your `dist/atomizer.css` file is built by Vite by adding it to your `index.html` file.

```html
<link href="dist/atomizer.css" />
<link href="/dist/atomizer.css" />
```

## Start your build process
Expand All @@ -80,5 +80,9 @@ npm run dev
Start adding Atomizer classes to your code base, an example `index.html` file.

```html
<h1 className="Fw(b) Fz(2rem)">Welcome!</h1>
<h1 class="Fw(b) Fz(2rem) C(red)">Welcome!</h1>
```

Then run `npm run build` to re-run Atomizer to generic the CSS.

> NOTE: Unfortunately, vite does not re-run atomizer when files are changed, so this is a manual process for now.

0 comments on commit 1ab3c38

Please sign in to comment.