I'm building a marketing site which has a main CSS theme which is used throughout.
The styles are added to the site using the css config option:
defineNuxtConfig({
css: [
Path.resolve(__dirname, './res/assets/styles/index.scss'),
]
})
As such, the styles are loaded on every page.
However, I have another part of the website designed to be embedded in a third-party application, where I want to use a completely separate stylesheet.
Is it possible to do this?
Ideas:
- compile separate stylesheets using vite , then apply per route with
useHead() - identify and disable the main
linktag using a route event handler - move the embedded part of the site to a subdomain
The first option seems like the best, but:
- I don't know how to do this in Nuxt's setup
- am I risking FOUC ?
Any help would be appreciated!