Skip to content

Conversation

maximepvrt
Copy link
Contributor

@maximepvrt maximepvrt commented Jan 27, 2025

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

closes #15147

@maximepvrt maximepvrt changed the title feat(nuxt): detect automatically environment feat(nuxt): detect automatically environment (#15147) Jan 27, 2025
@mydea mydea requested review from andreiborza and s1gr1d January 28, 2025 12:27
@mydea mydea changed the title feat(nuxt): detect automatically environment (#15147) feat(nuxt): detect automatically environment Jan 29, 2025
@mydea mydea changed the title feat(nuxt): detect automatically environment feat(nuxt): Automatically detect environment Jan 29, 2025
@mydea
Copy link
Member

mydea commented Jan 29, 2025

If the console logs are removed, should this be ready to be reviewed? :)

@maximepvrt
Copy link
Contributor Author

Hi @mydea, as mentioned in the issue, I tried setting up an environment to test locally, but my console.log statements aren't showing up, and I’m not sure if this is normal or if I made a mistake when setting up the local module. I opened the MR to get feedback on whether it's expected not to see the console.log outputs and why the environment setup isn't working on my end. Also, I feel like there’s a lack of a contribution guide, which could help with improving the module.

@maximepvrt
Copy link
Contributor Author

I attempted to import the module locally using:

export default defineNuxtConfig({
  modules: ['../sentry-javascript/packages/nuxt/src']
})

However, my app gets stuck on "ℹ Vite client warmed up" and doesn’t start.

@mydea
Copy link
Member

mydea commented Jan 30, 2025

Ah sorry, I did not connect this to the issue. Somebody from the team will look into it, we are quite swamped right now and parts of the team that have the most knowledge on Nuxt are currently unavailable, so it may take a few days, but we'll try to look into it next week latest!

@s1gr1d
Copy link
Member

s1gr1d commented Feb 3, 2025

This looks good in general, please add this to the E2E test as well (here). Regarding testing this locally: You can build the package, then build the tarball and then add this tarball like a npm package in your test application's node_modules. Then you can set up Sentry in Nuxt as you would normally do this.

@lforst
Copy link
Contributor

lforst commented Mar 3, 2025

Closing due to inactivity.

@lforst lforst closed this Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatically set environment to development in Nuxt dev mode

4 participants