Skip to content

Commit

Permalink
fix(ui): bootstrap bundling issue, duplicate module
Browse files Browse the repository at this point in the history
  • Loading branch information
Hazer committed May 25, 2024
1 parent e3c7d03 commit 4a2a791
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src_assets/common/assets/web/apps.html
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,10 @@ <h4>{{ $t('apps.env_vars_about') }}</h4>
</div>
</body>
<script type="module">
import { createApp } from 'vue';
import { createApp } from 'vue'
import { initApp } from './init'
import Navbar from './Navbar.vue'
import {Dropdown} from 'bootstrap'
import { Dropdown } from 'bootstrap/dist/js/bootstrap'

const app = createApp({
components: {
Expand Down
5 changes: 5 additions & 0 deletions src_assets/common/assets/web/init.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import i18n from './locale'

// must import even if not implicitly using here
// https://github.com/aurelia/skeleton-navigation/issues/894
// https://discourse.aurelia.io/t/bootstrap-import-bootstrap-breaks-dropdown-menu-in-navbar/641/9
import 'bootstrap/dist/js/bootstrap'

export function initApp(app, config) {
//Wait for locale initialization, then render
i18n().then(i18n => {
Expand Down
1 change: 0 additions & 1 deletion src_assets/common/assets/web/template_header.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
<link href="@fortawesome/fontawesome-free/css/all.min.css" rel="stylesheet">
<link href="bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
<link href="/assets/css/sunshine.css" rel="stylesheet" />
<script type="module" src="bootstrap/dist/js/bootstrap.bundle.min.js"></script>

0 comments on commit 4a2a791

Please sign in to comment.