Giter Club home page Giter Club logo

Comments (7)

lforst avatar lforst commented on July 24, 2024

Hi, would you mind console logging your plugins on build and sharing them here? I cannot immediately spot where we would be missing a plugin name. Maybe the logs help us find the culprit.

from sentry-javascript-bundler-plugins.

LukasKlement avatar LukasKlement commented on July 24, 2024

These are the plugins being loaded (console logging node_modules/esbuild/lib/main.js):

[
  { name: 'angular-sourcemap-ignorelist', setup: [Function: setup] },
  { name: 'angular-compiler', setup: [AsyncFunction: setup] },
  { build: { sourcemap: true }, plugins: [ [Object] ] }
]

These are the items I get when logging the let item of plugins iterator:

{ name: 'angular-sourcemap-ignorelist', setup: [Function: setup] }
{ name: 'angular-compiler', setup: [AsyncFunction: setup] }
plugins:  [
  { name: 'angular-sourcemap-ignorelist', setup: [Function: setup] },
  { name: 'angular-polyfills', setup: [Function: setup] }
]
{ name: 'angular-sourcemap-ignorelist', setup: [Function: setup] }
{ name: 'angular-polyfills', setup: [Function: setup] }
plugins:  [
  { name: 'angular-styles-global', setup: [Function: setup] },
  { name: 'angular-sass', setup: [AsyncFunction: setup] },
  { name: 'angular-less', setup: [AsyncFunction: setup] },
  { name: 'angular-css', setup: [Function: setup] },
  { name: 'angular-css-resource', setup: [Function: setup] },
  { name: 'angular-css-inline-fonts-plugin', setup: [Function: setup] }
]
{ name: 'angular-styles-global', setup: [Function: setup] }
{ name: 'angular-sass', setup: [AsyncFunction: setup] }
{ name: 'angular-less', setup: [AsyncFunction: setup] }
{
  build: { sourcemap: true },
  plugins: [
    {
      '0': [Object],
      '1': [Object],
      '2': [Object],
      enforce: 'post',
      name: 'sentry'
    }
  ]
}
{ name: 'angular-css', setup: [Function: setup] }
{ name: 'angular-css-resource', setup: [Function: setup] }

The vite.config.ts is the one from your docs:

import { defineConfig } from "vite";
import { sentryVitePlugin } from "@sentry/vite-plugin";

export default defineConfig({
  build: {
    sourcemap: true,
  },
  plugins: [
    sentryVitePlugin({
      org: "my-org",
      project: "my-project",
      authToken: process.env.SENTRY_TOKEN,
    }),
  ],
});

from sentry-javascript-bundler-plugins.

lforst avatar lforst commented on July 24, 2024

Can you elaborate why you are using the vite plugin while using the esbuild Angular builder? Can you try using the @sentry/esbuild plugin instead?

from sentry-javascript-bundler-plugins.

LukasKlement avatar LukasKlement commented on July 24, 2024

Thanks for the note, apologies posted on the wrong plugin. The error is the same though, this is the config:

angular.json: "builder": "@angular-builders/custom-esbuild:application",

esbuild.config.ts:

import { sentryEsbuildPlugin } from "@sentry/esbuild-plugin";
import esbuild from "esbuild";

esbuild.build({
  sourcemap: true, // Source map generation must be turned on
  plugins: [
    // Put the Sentry esbuild plugin after all other plugins
    sentryEsbuildPlugin({
      org: "org",
      project: "project",
      authToken: process.env.SENTRY_AUTH_TOKEN,
    }),
  ],
});

from sentry-javascript-bundler-plugins.

lforst avatar lforst commented on July 24, 2024

I cannot reproduce this with the latest version of esbuild and the esbuild plugin. Would you mind sharing a small reproduction example? Thanks!

from sentry-javascript-bundler-plugins.

LukasKlement avatar LukasKlement commented on July 24, 2024

Hi, thanks - here's an example: https://stackblitz.com/edit/stackblitz-starters-ddzaip?file=src%2Fmain.ts
Indeed, I get the following error now: "Add only entry points to the 'files' or 'include' properties in your tsconfig."

from sentry-javascript-bundler-plugins.

lforst avatar lforst commented on July 24, 2024

@LukasKlement the stackblitz you shared doesn't contain any Sentry plugins 🤔 did you press save?

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.