From 1ab3c382c1e4dc803e06e382276791bb78e03a4a Mon Sep 17 00:00:00 2001 From: redonkulus Date: Fri, 2 Dec 2022 10:54:24 -0800 Subject: [PATCH] docs(vite): update steps, fix #550 --- docs/integrations/vite.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/integrations/vite.md b/docs/integrations/vite.md index ac85cba2..9fbd0fd2 100644 --- a/docs/integrations/vite.md +++ b/docs/integrations/vite.md @@ -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}', @@ -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(() => { @@ -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 - + ``` ## Start your build process @@ -80,5 +80,9 @@ npm run dev Start adding Atomizer classes to your code base, an example `index.html` file. ```html -

Welcome!

+

Welcome!

``` + +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.