feat(nuxt): Add base boilerplate for nuxt#12573
Conversation
| const _vueIntegration = ((integrationOptions: Partial<VueOptions> = {}) => { | ||
| return { | ||
| name: INTEGRATION_NAME, | ||
| // TODO v8: Remove this |
There was a problem hiding this comment.
I think we can remove this comment, right?
size-limit report 📦
|
packages/nuxt/package.json
Outdated
| "@babel/types": "7.20.7", | ||
| "@nuxt/module-builder": "0.8.0", | ||
| "nuxt": "^3.12.2", | ||
| "vite": "^5.0.10" |
There was a problem hiding this comment.
I think you don't need this in here, handled by the workspace already afaik
|
Could we already add some basic unit tests for the sdk init? |
packages/vue/src/sdk.ts
Outdated
| ...config, | ||
| }; | ||
|
|
||
| applySdkMetadata(config, 'nuxt', ['nuxt', 'vue']); |
There was a problem hiding this comment.
Does not look right, probably a leftover? :)
packages/nuxt/src/module.ts
Outdated
| setup(_moduleOptions, _nuxt) { | ||
| // Ignore because of `import.meta.url` | ||
| // eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
| // @ts-ignore |
There was a problem hiding this comment.
m: We should use @ts-expect-error, we can remove the eslint disable then.
Why is import.meta.url causing issues? We should change the tsconfig in this repo to make sure this works.
| const config = useRuntimeConfig(); | ||
|
|
||
| // eslint-disable-next-line no-console | ||
| console.log('Plugin initialized'); |
There was a problem hiding this comment.
m: Let's avoid using a console.log here.
Also we should only log after we call init. Perhaps we use debug logger?
There was a problem hiding this comment.
I added this log for testing reasons as long as this sdk is in development. But I'll remove it now to make sure I do not forget to remove it later 👍🏻
packages/nuxt/README.md
Outdated
| public: { | ||
| sentry: { | ||
| dsn: env.DSN, | ||
| // Additional config |
There was a problem hiding this comment.
does options like beforeSend or adding custom integrations similar work here? If not, we need a solution for that.
There was a problem hiding this comment.
Right now it looks like this works
There was a problem hiding this comment.
we'll need to also test that this works with importing stuff (e.g. import { httpClientIntegration } from '@sentry/nuxt'), but we can look at that in follow ups too! (just before we fully launch this)
7ba1162 to
b65ba5d
Compare
Boilerplate which adds a basic wrapper around the vue SDK. Still a lot WIP.
closes #12572