From eae719b3199bae87f90e78e90f5bcc326814350e Mon Sep 17 00:00:00 2001 From: Jon Carifio Date: Sun, 18 Jun 2023 00:37:04 +0000 Subject: [PATCH 1/3] Move image gallery component to common package. --- {m101-supernova/src => common/src/components}/Gallery.vue | 2 +- common/src/index.ts | 4 ++-- m101-supernova/src/main.ts | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) rename {m101-supernova/src => common/src/components}/Gallery.vue (99%) diff --git a/m101-supernova/src/Gallery.vue b/common/src/components/Gallery.vue similarity index 99% rename from m101-supernova/src/Gallery.vue rename to common/src/components/Gallery.vue index e1b83703..ce209d6d 100644 --- a/m101-supernova/src/Gallery.vue +++ b/common/src/components/Gallery.vue @@ -193,7 +193,7 @@ export default defineComponent({ - diff --git a/common/src/components/IconButton.vue b/common/src/components/IconButton.vue index 0d48beee..5a82ef1b 100644 --- a/common/src/components/IconButton.vue +++ b/common/src/components/IconButton.vue @@ -120,13 +120,13 @@ export default defineComponent({ color: var(--focus-color); border-color: var(--focus-color); } -} -.active { - box-shadow: 0px 0px 10px 3px var(--color); + &.active { + box-shadow: 0px 0px 10px 3px var(--color); - &:focus { - box-shadow: 0px 0px 10px 3px var(--focus-color); + &:focus { + box-shadow: 0px 0px 10px 3px var(--focus-color); + } } } From f39489d6bc2aaa34cc38d4069643e737a293af0c Mon Sep 17 00:00:00 2001 From: Jon Carifio Date: Mon, 19 Jun 2023 01:09:00 +0000 Subject: [PATCH 3/3] Make WWT engine external to avoid instanceof issues. --- common/vue.config.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/common/vue.config.js b/common/vue.config.js index 96cbd144..d596c4a6 100644 --- a/common/vue.config.js +++ b/common/vue.config.js @@ -23,6 +23,17 @@ module.exports = defineConfig({ return opts; }); } + + // Keep the very big WWT engine external + config.externals({ + '@wwtelescope/engine': { + 'amd': '@wwtelescope/engine', // typeof define === 'function' && define.amd + 'commonjs2': '@wwtelescope/engine', // typeof exports === 'object' && typeof module === 'object' + 'commonjs': '@wwtelescope/engine', // typeof exports === 'object' + 'root': 'wwtlib' // none of the above: browser mode using global variables + } + }); + }, // TODO: For some reason we're having trouble loading chunks