Skip to content

Commit f8087d5

Browse files
committed
Split web components into its own file
1 parent f1955fe commit f8087d5

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import './web-components/VersionDropdown'

src/Elastic.Documentation.Site/Assets/main.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { initNav } from './pages-nav'
77
import { initSmoothScroll } from './smooth-scroll'
88
import { initTabs } from './tabs'
99
import { initTocNav } from './toc-nav'
10-
import './web-components/VersionDropdown'
1110
import 'htmx-ext-head-support'
1211
import 'htmx-ext-preload'
1312
import 'htmx.org'

src/Elastic.Documentation.Site/Layout/_Head.cshtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<link rel="preload" href="@fontFile" as="font" type="font/woff2" crossorigin>
99
}
1010
<link rel="stylesheet preload" as="style" type="text/css" href="@Model.Static("styles.css")" crossorigin/>
11+
<script src="@Model.Static("custom-elements.js")" defer></script>
1112
<script src="@Model.Static("main.js")" defer></script>
1213
@if (Model.CanonicalBaseUrl is not null)
1314
{

src/Elastic.Documentation.Site/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
"fmt:write": "prettier --write ."
1313
},
1414
"targets": {
15+
"customElements": {
16+
"distDir": "_static",
17+
"source": "Assets/custom-elements.ts"
18+
},
1519
"js": {
1620
"distDir": "_static",
1721
"source": "Assets/main.ts"

0 commit comments

Comments
 (0)