3👍
✅
Importing the config file would cause it to be bundled. If you want the config file to be read on demand instead, you could fetch
it:
import { onMounted, ref } from 'vue'
export default {
setup() {
const config = ref({})
const fetchData = async () => {
const resp = await fetch('/finnhub.config.json')
config.value = await resp.json()
}
onMounted(() => {
fetchData()
})
}
}
Source:stackexchange.com