Skip to content

Commit 2ac7d8c

Browse files
committed
fix: temporary fix remix till i figure it out
1 parent af5137f commit 2ac7d8c

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

packages/remix/package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,17 @@
2929
"require": "./build/cjs/index.client.js",
3030
"default": "./build/cjs/index.client.js"
3131
},
32-
"node": {
33-
"import": "./build/esm/index.server.js",
34-
"require": "./build/cjs/index.server.js",
35-
"default": "./build/cjs/index.server.js"
36-
},
32+
"node": "./build/cjs/index.server.js",
3733
"worker": {
3834
"import": "./build/esm/cloudflare/index.js",
3935
"require": "./build/cjs/cloudflare/index.js",
4036
"default": "./build/esm/cloudflare/index.js"
4137
}
4238
},
4339
"./cloudflare": {
40+
"types": "./build/types/cloudflare/index.d.ts",
4441
"import": "./build/esm/cloudflare/index.js",
4542
"require": "./build/cjs/cloudflare/index.js",
46-
"types": "./build/types/cloudflare/index.d.ts",
4743
"default": "./build/esm/cloudflare/index.js"
4844
},
4945
"./import": {

packages/remix/rollup.npm.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ export default [
1515
output: {
1616
// make it so Rollup calms down about the fact that we're combining default and named exports
1717
exports: 'named',
18+
// Always include __esModule marker for proper CJS/ESM interop
19+
// This ensures both `import * as Sentry` and `import Sentry` work correctly
20+
esModule: true,
1821
},
1922
},
2023
}),

packages/remix/test/integration/instrument.server.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as Sentry from '@sentry/remix';
1+
import Sentry from '@sentry/remix';
22

33
Sentry.init({
44
dsn: 'https://public@dsn.ingest.sentry.io/1337',

packages/remix/test/integration/vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { vitePlugin as remix } from '@remix-run/dev';
22
import { defineConfig, Plugin } from 'vite';
3-
import { sentryRemixVitePlugin } from '@sentry/remix';
3+
import Sentry from '@sentry/remix';
44
import path from 'path';
55

66
// Custom plugin to resolve @sentry/remix to ESM builds for Vite
@@ -37,6 +37,6 @@ export default defineConfig({
3737
v3_lazyRouteDiscovery: true,
3838
},
3939
}),
40-
sentryRemixVitePlugin(),
40+
Sentry.sentryRemixVitePlugin(),
4141
],
4242
});

0 commit comments

Comments
 (0)