import threejs in nuxtjs code example
Example: nuxt SyntaxError Unexpected token { threejs
<template>
<div>
<!-- wrap in client only -->
<client-only>
<threejs-component />
</client-only>
</div>
</template>
<script>
export default {
//Dynamic load (dont load as an import above this)
components: {
ThreejsComponent: process.browser ? () => import('~/path/to/ThreejsComponent.vue') : null
}
}
</script>