Closed
Description
🐛 The bug
Pannellum.js still served from unpkg.com despite setting bundle to true
with the following code:
<script lang="ts" setup>
const { $script } = useScriptNpm({
packageName: 'pannellum',
file: 'build/pannellum.js',
version: '2.5.6',
scriptOptions: {
bundle: true,
use() {
// @ts-ignore
return { pannellum: window.pannellum };
},
},
});
onMounted(() => {
$script.then(({ pannellum }) => {
// do something
});
});
</script>
unpkg.com link: https://unpkg.com/[email protected]/build/pannellum.js
To build and preview:
npm run build
npm run preview
🛠️ To reproduce
https://stackblitz.com/edit/nuxt-scrript-pannellum-bundle?file=app.vue
🌈 Expected behavior
Pannellum.js should be served from the bundle after the build.
ℹ️ Additional context
No response