Skip to content
Discussion options

You must be logged in to vote

noExternals: true is all-or-nothing, that's why it breaks. What you actually want is the inline list under externals, which is additive:

// nitro.config.ts (or the `nitro` block in your framework config)
export default defineNitroConfig({
  externals: {
    inline: ['the-package'], // a string, or a RegExp if you need to catch subpaths too
  },
})

Everything else stays external (so dev stays fast) and only that one package gets bundled. Nitro defu-merges your inline into the externals plugin's default list rather than replacing it, and that same plugin runs in the dev rollup build, not just nitro build, so it takes effect in nitro dev.

One heads-up if you're on Nitro v3 / latest Nuxt: ext…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by kumardeo
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants