From 58fd559d6dfb10bab48c544ad9f578f5dc1fd493 Mon Sep 17 00:00:00 2001 From: Alex MacArthur Date: Sun, 7 Jan 2024 16:06:34 -0600 Subject: [PATCH] fix(docs): move Vite config 'plugins' property (#506) --------- Co-authored-by: gioboa --- docs/copy-library-files.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/docs/copy-library-files.md b/docs/copy-library-files.md index 3f31a6b2..319a9e0e 100644 --- a/docs/copy-library-files.md +++ b/docs/copy-library-files.md @@ -80,13 +80,11 @@ import path from 'path'; import { partytownVite } from '@builder.io/partytown/utils'; export default ({ command }) => ({ - build: { - plugins: [ - partytownVite({ - dest: path.join(__dirname, 'dist', '~partytown'), - }), - ], - }, + plugins: [ + partytownVite({ + dest: path.join(__dirname, 'dist', '~partytown'), + }), + ], }); ``` @@ -106,14 +104,14 @@ module.exports = { patterns: [ { from: partytown.libDirPath(), - to: path.join(__dirname, "public", "~partytown"), + to: path.join(__dirname, 'public', '~partytown'), }, ], }), ], }; - ``` + ## Laravel Mix Below is an example of using [Mix's copy()](https://laravel-mix.com/docs/6.0/copying-files/) to copy the source `lib` directory found in the [@builder.io/partytown](https://www.npmjs.com/package/@builder.io/partytown) package, to the `public/~partytown/` directory: