diff --git a/.changeset/proud-peaches-cheat.md b/.changeset/proud-peaches-cheat.md new file mode 100644 index 0000000..c323561 --- /dev/null +++ b/.changeset/proud-peaches-cheat.md @@ -0,0 +1,8 @@ +--- +"vite-plugin-pagefind": patch +--- + +Add support for the pagefind highlight script, +as well as a new configuration option to support +having the pagefind bundle placed in other places +other than the default `/pagefind/pagefind.js`. diff --git a/package.json b/package.json index afe2b61..894e646 100644 --- a/package.json +++ b/package.json @@ -12,17 +12,11 @@ "url": "https://github.com/Hugos68/vite-plugin-pagefind" }, "homepage": "https://github.com/Hugos68/vite-plugin-pagefind#vite-plugin-pagefind", - "keywords": [ - "vite", - "vite-plugin", - "pagefind" - ], + "keywords": ["vite", "vite-plugin", "pagefind"], "publishConfig": { "access": "public" }, - "files": [ - "dist" - ], + "files": ["dist"], "main": "./dist/plugins/pagefind.js", "exports": { ".": { diff --git a/src/plugins/pagefind-build.js b/src/plugins/pagefind-build.js index a04cfd5..3f0c0ee 100644 --- a/src/plugins/pagefind-build.js +++ b/src/plugins/pagefind-build.js @@ -16,7 +16,10 @@ export default function build() { return { build: { rollupOptions: { - external: [`/${pagefind_url}/pagefind.js`, `/${pagefind_url}/pagefind-highlight.js`], + external: [ + `/${pagefind_url}/pagefind.js`, + `/${pagefind_url}/pagefind-highlight.js`, + ], }, }, }; diff --git a/src/plugins/pagefind-dev.js b/src/plugins/pagefind-dev.js index 05be026..dda983f 100644 --- a/src/plugins/pagefind-dev.js +++ b/src/plugins/pagefind-dev.js @@ -25,7 +25,10 @@ export default function dev() { assetsInclude: ["**/pagefind.js", "**/pagefind-highlight.js"], build: { rollupOptions: { - external: [`/${pagefind_url}/pagefind.js`, `/${pagefind_url}/pagefind-highlight.js`], + external: [ + `/${pagefind_url}/pagefind.js`, + `/${pagefind_url}/pagefind-highlight.js`, + ], }, }, };