wasp icon indicating copy to clipboard operation
wasp copied to clipboard

Allow users to configure server build process by configuring `rollup` like we allow configuring Vite for client

Open infomiho opened this issue 2 months ago • 0 comments

Sometimes users will need to customise the server build process e.g. while setting up Sentry, it offered me to upload source maps for better error reporting.

Example Rollup config for Sentry set up:

import { sentryRollupPlugin } from "@sentry/rollup-plugin";

export default {
  output: {
    sourcemap: true, // Source map generation must be turned on
  },
  plugins: [
    // Put the Sentry rollup plugin after all other plugins
    sentryRollupPlugin({
      authToken: process.env.SENTRY_AUTH_TOKEN,
      org: "wasp-g1",
      project: "node-express",
    }),
  ],
};

infomiho avatar Nov 27 '24 10:11 infomiho