|
4 | 4 | @using IntelliTect.Multitool |
5 | 5 | @using EssentialCSharp.Common |
6 | 6 | @inject ISiteMappingService _SiteMappings |
| 7 | +@using Microsoft.AspNetCore.Components |
| 8 | +@{ |
| 9 | + var prodMap = new ImportMapDefinition( |
| 10 | + new Dictionary<string, string> |
| 11 | + { |
| 12 | + { "vue", "./lib/vue/dist/vue.esm-browser.prod.js" }, |
| 13 | + { "vue-window-size", "./lib/vue-window-size/composition-api/dist/index.js" }, |
| 14 | + }, null, null); |
| 15 | + var devMap = new ImportMapDefinition( |
| 16 | + new Dictionary<string, string> |
| 17 | + { |
| 18 | + { "vue", "./lib/vue/dist/vue.esm-browser.js" }, |
| 19 | + { "vue-window-size", "./lib/vue-window-size/composition-api/dist/index.js" }, |
| 20 | + }, null, null); |
| 21 | +} |
7 | 22 | <!DOCTYPE html> |
8 | 23 | <html lang="en"> |
9 | 24 | <head> |
|
46 | 61 | @*So that Safari can import modules*@ |
47 | 62 | <script async src="/lib/es-module-shims/dist/es-module-shims.js"></script> |
48 | 63 | <environment include="Development"> |
49 | | - <script type="importmap"> |
50 | | - { |
51 | | - "imports": { |
52 | | - "vue": "./lib/vue/dist/vue.esm-browser.js", |
53 | | - "vue-window-size": "./lib/vue-window-size/composition-api/dist/index.js" |
54 | | - } |
55 | | - } |
56 | | - </script> |
| 64 | + <script type="importmap" asp-importmap="@devMap"></script> |
57 | 65 | </environment> |
58 | 66 | <environment exclude="Development"> |
59 | | - <script type="importmap"> |
60 | | - { |
61 | | - "imports": { |
62 | | - "vue": "./lib/vue/dist/vue.esm-browser.prod.js", |
63 | | - "vue-window-size": "./lib/vue-window-size/composition-api/dist/index.js" |
64 | | - } |
65 | | - } |
66 | | - </script> |
| 67 | + <script type="importmap" asp-importmap="@prodMap"></script> |
67 | 68 | </environment> |
68 | 69 | <script type="text/javascript"> |
69 | 70 | (function (c, l, a, r, i, t, y) { |
|
0 commit comments