Skip to content

Commit 242cee0

Browse files
committed
Change ordering of plugins
1 parent ff2f33d commit 242cee0

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

packages/solidstart/src/vite/sentrySolidStartVite.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,19 @@ import type { SentrySolidStartPluginOptions } from './types';
99
export const sentrySolidStartVite = (options: SentrySolidStartPluginOptions = {}): Plugin[] => {
1010
const sentryPlugins: Plugin[] = [];
1111

12-
sentryPlugins.push(makeBuildInstrumentationFilePlugin(options));
13-
1412
if (process.env.NODE_ENV !== 'development') {
1513
if (options.sourceMapsUploadOptions?.enabled ?? true) {
1614
sentryPlugins.push(...makeSourceMapsVitePlugin(options));
1715
}
1816
}
1917

18+
// TODO: Ensure this file is source mapped too.
19+
// Placing this after the sentry vite plugin means this
20+
// file won't get a sourcemap and won't have a debug id injected.
21+
// Because the file is just copied over to the output server
22+
// directory the release injection file from sentry vite plugin
23+
// wouldn't resolve correctly otherwise.
24+
sentryPlugins.push(makeBuildInstrumentationFilePlugin(options));
25+
2026
return sentryPlugins;
2127
};

packages/solidstart/test/vite/sentrySolidStartVite.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ describe('sentrySolidStartVite()', () => {
2323
const plugins = getSentrySolidStartVitePlugins();
2424
const names = plugins.map(plugin => plugin.name);
2525
expect(names).toEqual([
26-
'sentry-solidstart-build-instrumentation-file',
2726
'sentry-solidstart-source-maps',
2827
'sentry-telemetry-plugin',
2928
'sentry-vite-release-injection-plugin',
3029
'sentry-debug-id-upload-plugin',
3130
'sentry-vite-debug-id-injection-plugin',
3231
'sentry-vite-debug-id-upload-plugin',
3332
'sentry-file-deletion-plugin',
33+
'sentry-solidstart-build-instrumentation-file',
3434
]);
3535
});
3636

0 commit comments

Comments
 (0)