apollo icon indicating copy to clipboard operation
apollo copied to clipboard

External config file in Nuxt Bridge alongside Vite

Open chadwtaylor opened this issue 4 years ago • 1 comments

With the exciting public-beta launch of Nuxt Bridge and Nuxt v3, our team is eager to get our hands on the Nuxt Bridge, especially with Vite, to speed up our development efforts. Because Vite doesn't like require and only works with imports, this module will need to be updated since we use an external config file.

Our apollo config in nuxt.config.js:

{
  // ...
  clientConfigs: {
    default: '~/configs/apollo/default.config.js', 
  }, 
  // ...
}

We use an external file default.config.js which prompts this module to load our config file through the require function: https://github.com/nuxt-community/apollo-module/blob/master/lib/templates/plugin.js#L31 (and Vite doesn't like that since it only plays with the import function).

This issue was first reported: #402

With the recent public-beta launch of Nuxt (Bridge and v3), I wanted to escalate this issue. Happy to supply more information/code if needed.

chadwtaylor avatar Oct 25 '21 13:10 chadwtaylor

any updates on this?

lucatk avatar Jun 11 '22 16:06 lucatk