diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 100a34f..8fe526b 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -6,6 +6,7 @@ import {resolve} from "path"; import { CssCleanup, baseCleanup } from "../node_modules/@shopware-docs/vitepress/src/plugins/cssCleanup"; import Inspect from "vite-plugin-inspect"; +import liveReload from 'vite-plugin-live-reload' import {copyAdditionalAssets, createSitemap, storeRedirects} from "../node_modules/@shopware-docs/vitepress/src/helpers"; import navigation from "./navigation"; @@ -76,7 +77,6 @@ export default defineConfigWithTheme({ }, vite: { - mode: 'development', plugins: [ Inspect(), ViteRequireContext.default({ @@ -87,6 +87,10 @@ export default defineConfigWithTheme({ ...baseCleanup, ] }), + liveReload([ + '../node_modules/@shopware-docs/**/*.*', + '../node_modules/vitepress-shopware-docs/**/*.*', + ]), ], build: { rollupOptions: { diff --git a/package.json b/package.json index 3a2bf84..24cfdcf 100644 --- a/package.json +++ b/package.json @@ -83,6 +83,7 @@ "unocss": "^0.51.12", "uuid": "^9.0.0", "vite-plugin-inspect": "^0.7.26", + "vite-plugin-live-reload": "^3.0.2", "vitest": "^0.31.0", "vue-instantsearch": "^4.10.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a8c4772..cf9b2e1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -198,6 +198,9 @@ devDependencies: vite-plugin-inspect: specifier: ^0.7.26 version: 0.7.26 + vite-plugin-live-reload: + specifier: ^3.0.2 + version: 3.0.2 vitest: specifier: ^0.31.0 version: 0.31.0(less@4.2.0)(sass@1.62.1)(terser@5.17.3) @@ -15587,6 +15590,13 @@ packages: - supports-color dev: true + /vite-plugin-live-reload@3.0.2: + resolution: {integrity: sha512-7QprEPLN9f4J9ljnovzoe2xmkTKTEn/QpxpwSmvbb2MtRQyWi0c0Zg3+s3cBhxHaKe9eMYHUG4OQGpCYwFwdaw==} + dependencies: + chokidar: 3.5.3 + picocolors: 1.0.0 + dev: true + /vite@4.5.0(@types/node@18.16.7)(less@4.2.0)(sass@1.62.1)(terser@5.17.3): resolution: {integrity: sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==} engines: {node: ^14.18.0 || >=16.0.0}