Skip to content

Commit 6508364

Browse files
authored
Merge pull request #6841 from FlowFuse/6840-tour-styles-fix
Fix tour styling
2 parents 784ded5 + 8212ebf commit 6508364

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

frontend/src/tours/Tours.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,16 @@ import Product from '../services/product.js'
66

77
// eslint-disable-next-line n/no-extraneous-import
88
import 'shepherd.js/dist/css/shepherd.css'
9-
import './tour-theme.scss'
109

1110
import store from '../store/index.js'
1211

1312
function create (id, tourJson, onCloseHook) {
13+
// Load tour styles at point-of-use
14+
// NOTE: Due to sass loader settings, a static import does not work since there are no explicit
15+
// references to the styles in the codebase. This dynamic import ensures the styles are
16+
// included in the build and applied when the tour is used.
17+
import('./tour-theme.scss').catch(() => {})
18+
1419
store.dispatch('ux/tours/activateTour', id)
1520
Product.capture('ff-tour-start', {
1621
tour_id: id

0 commit comments

Comments
 (0)