Skip to content

Commit

Permalink
feat: add support for search script customization
Browse files Browse the repository at this point in the history
  • Loading branch information
filzrev committed Oct 21, 2024
1 parent 7b7e3e7 commit 1b3917b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion templates/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,24 @@ async function buildModernTemplate() {
entryPoints: [
'modern/src/docfx.ts',
'modern/src/search-worker.ts',
'modern/src/search.ts',
],
external: [
'./main.js'
],
plugins: [
sassPlugin()
sassPlugin(),
{
name: 'Exclude `./search` script from bundle',
setup(build) {
build.onResolve({ filter: /^\.\/search$/ }, args => {
return {
path: './search.min.js',
external: true
};
});
}
}
],
loader,
}
Expand Down

0 comments on commit 1b3917b

Please sign in to comment.