Giter Club home page Giter Club logo

Comments (5)

lforst avatar lforst commented on July 24, 2024 2

Hi, this should be fixed if you try the newest version!

from sentry-javascript-bundler-plugins.

719media avatar 719media commented on July 24, 2024

Sorry, I know the report is sparse, I will dig a little more, but I'm going to guess it has something to do with
[sentry-vite-plugin] Info: Using environment variables configured in ".env.sentry-build-plugin".

This may very well not be sentry's fault. I tested on 2.13.0 and the error still occurs, although it just cropped up with me this morning (I've been using sentry with vite for about 6 months now).

Somehow vite/vue isn't using .env.production as it should, I'll try and repro a simple test case.

OK Test case below. I couldn't codesandbox for a test case as it requires NODE_ENV to be set to utilize the production env value

  1. Install new vue project using npm create vue@latest
  2. create .env and .env.production files, and override a value in .env.production (e.g. VITE_testerson=TestDev and VITE_testerson=TestProd)
  3. Add a line <meta name="testerson" content="%VITE_testerson%"> into index.html
  4. npm run build
  5. Note that the value for testerson meta tag is TestProd
  6. npm install @sentry/vite-plugin, and add into vite.config.js plugins (sentryVitePlugin({}) works, do not need any config)
  7. npm run build
  8. Note that the value for testerson meta tag is now TestDev

from sentry-javascript-bundler-plugins.

lforst avatar lforst commented on July 24, 2024

Hi, I tried this with the steps you outlined but couldn't reproduce the issue you're describing. Would you mind creating a reproduction repo we could pull to replicate this? Thank you!

from sentry-javascript-bundler-plugins.

719media avatar 719media commented on July 24, 2024

Sure. Here you go
https://github.com/719media/sentry-vite-env-bug

from sentry-javascript-bundler-plugins.

lforst avatar lforst commented on July 24, 2024

Awesome thank you. Found the bug. Will release it asap.

from sentry-javascript-bundler-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.