Closed shidcordero closed 8 months ago
I'm closing this as there is no reproduction. Feel free to comment with one and I'll reopen!
@danielroe Here is a code sandbox with just nuxt-bridge, graphql and graphql-tag. https://codesandbox.io/s/tender-poitras-ofnpw?file=/pages/index.vue
This error also happens on a nuxt3 project but that can be worked around by using the following in the nuxt.config
build: {
transpile: ['tslib', '@apollo/client', 'ts-invariant']
},
However that same solution doesn't seem to work in nuxt-bridge
Running into that same issue with vue-apollo when trying to implement @nuxt/bridge ...
nuxt bridge version: 3.0.0-27304790.cad09fe vue-apollo version: 3.0.7
If you're encountering this on Bridge, you can try this workaround:
import { defineNuxtConfig } from '@nuxt/bridge'
export default defineNuxtConfig({
alias: {
tslib: 'tslib/tslib.es6.js'
}
})
The issue is an upstream one with libraries like graphql-tag
.
If you're encountering this on Bridge, you can try this workaround:
import { defineNuxtConfig } from '@nuxt/bridge' export default defineNuxtConfig({ alias: { tslib: 'tslib/tslib.es6.js' } })
The issue is an upstream one with libraries like
graphql-tag
.
Seems to work :) Thanks !
@danielroe thank you for the workaround! <3 Would you mind linking the upstream issue you mentioned? :pray:
The issue is summarised at https://v3.nuxtjs.org/concepts/esm/
If you're encountering this on Bridge, you can try this workaround:
import { defineNuxtConfig } from '@nuxt/bridge' export default defineNuxtConfig({ alias: { tslib: 'tslib/tslib.es6.js' } })
The issue is an upstream one with libraries like
graphql-tag
.
Seems work for me as well, previously had issue with nuxtjs/sentry package. Thank you!
If you're encountering this on Bridge, you can try this workaround:
import { defineNuxtConfig } from '@nuxt/bridge' export default defineNuxtConfig({ alias: { tslib: 'tslib/tslib.es6.js' } })
The issue is an upstream one with libraries like
graphql-tag
.
The solution works like charm 🚀
The issue is summarised at https://v3.nuxtjs.org/concepts/esm/
@danielroe the link seems to be not working
It is now https://nuxt.com/docs/guide/concepts/esm.
Environment
Nuxt CLI v3.0.0-27242401.39ed77e 16:23:30 RootDir: D:\Documents\Office\Gistlens\Telecompaper\front-end 16:23:30 Nuxt project info: 16:23:30
Windows_NT
v16.11.0
2.16.0-27226092.034b9901
Yarn
Webpack
target
,telemetry
,env
,publicRuntimeConfig
,privateRuntimeConfig
,head
,css
,alias
,loadingIndicator
,plugins
,components
,buildModules
,modules
,nuxt-buefy
,axios
,dayjs
,pwa
,i18n
,apollo
,build
,generate
- Runtime Modules:nuxt-buefy@0.4.10
,@nuxtjs/axios@5.13.6
,@nuxtjs/pwa@3.3.5
,nuxt-i18n@6.28.1
,@nuxtjs/apollo@4.0.1-rc.5
,@nuxtjs/dayjs@1.4.0
Build Modules:
@nuxtjs/eslint-module@3.0.2
,@nuxtjs/stylelint-module@4.0.0
,@nuxt/bridge@3.0.0-27242401.39ed77e
Describe the bug
It throws this error in the console. Compile and build not showing any error
Removing defineNuxtConfig or adding
bridge: false
removes the error.Reproduction
package.json
nuxt.config.js
Additional context
No response
Logs
No response