Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions rspack.config.ts
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prob should throw this in CODEOWNERS if we want to keep the owners-js-build team

Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const SENTRY_BACKEND_PORT = env.SENTRY_BACKEND_PORT;
const SENTRY_WEBPACK_PROXY_HOST = env.SENTRY_WEBPACK_PROXY_HOST;
const SENTRY_WEBPACK_PROXY_PORT = env.SENTRY_WEBPACK_PROXY_PORT;
const SENTRY_RELEASE_VERSION = env.SENTRY_RELEASE_VERSION;
const SENTRY_DEVSERVER_NGROK = env.SENTRY_DEVSERVER_NGROK;

// Used by sentry devserver runner to force using webpack-dev-server
const FORCE_WEBPACK_DEV_SERVER = !!env.FORCE_WEBPACK_DEV_SERVER;
Expand Down Expand Up @@ -307,8 +308,10 @@ const appConfig: Configuration = {
test: /\.(js|jsx|ts|tsx)$/,
// Avoids recompiling core-js based on usage imports
exclude: /node_modules[\\/]core-js/,
loader: 'builtin:swc-loader',
options: swcReactLoaderConfig,
use: [
{loader: 'builtin:swc-loader', options: swcReactLoaderConfig},
// {loader: 'babel-loader'},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented out babel-loader appears accidentally committed

Low Severity

The PR description states this change is only about adding SENTRY_DEVSERVER_NGROK to allowed hosts, but it also includes an unrelated change to the JS/TS loader configuration. The loader syntax was converted from direct loader/options properties to a use array, and a commented-out // {loader: 'babel-loader'} line was left behind. This appears to be leftover testing code that was accidentally included in the commit.

Fix in Cursor Fix in Web

],
},
{
test: /\.mdx?$/,
Expand Down Expand Up @@ -645,6 +648,9 @@ if (
// SEO: ngrok, hot reload, SENTRY_UI_HOT_RELOAD. Uncomment this to allow hot-reloading when using ngrok. This is disabled by default
// since ngrok urls are public and can be accessed by anyone.
// '.ngrok.io',

// Needed if you want to use ngrok w/ backend
...(SENTRY_DEVSERVER_NGROK ? [`.${SENTRY_DEVSERVER_NGROK}`] : []),
],
static: {
directory: './src/sentry/static/sentry',
Expand Down
Loading