Without a plugin, server tags are ignored with a simple runtime check. This isn't ideal as you'll still be bundling the server code to the client.

To allow the server composables to be tree-shaken, getting an extra performance boost, you can install treeshake plugin.

This is entirely optional and may not be needed for your use case. Setting it up can be a little tricky.

yarn add @unhead/addons

Then, add the plugin to your build config.

Vite

// vite.config.tsimport { defineConfig } from 'vite'import UnheadVite from '@unhead/addons/vite'export default defineConfig({  plugins: [    UnheadVite(),  ],})

Webpack

// webpack.config.tsimport { UnheadWebpack } from '@unhead/addons/webpack'export default {  plugins: [    UnheadWebpack(),  ],}