diff --git a/package.json b/package.json index 11f95f8b0eab1e..0ba9c4ffb9901a 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,9 @@ "@emotion/is-prop-valid": "^1.3.0", "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.0", + "@mdx-js/loader": "^3.1.0", + "@mdx-js/mdx": "^3.1.0", + "@pmmmwh/react-refresh-webpack-plugin": "0.5.16", "@popperjs/core": "^2.11.5", "@react-aria/button": "^3.9.8", "@react-aria/combobox": "^3.10.3", @@ -74,6 +77,7 @@ "@sentry/status-page-list": "^0.6.0", "@sentry/webpack-plugin": "^3.4.0", "@spotlightjs/spotlight": "^2.0.0-alpha.1", + "@swc/plugin-emotion": "9.0.4", "@tanstack/query-async-storage-persister": "^5.72.1", "@tanstack/react-query": "^5.72.1", "@tanstack/react-query-devtools": "^5.72.1", @@ -84,7 +88,7 @@ "@types/gtag.js": "^0.0.12", "@types/history": "^3.2.5", "@types/invariant": "^2.2.35", - "@types/jest": "29.5.12", + "@types/jest": "29.5.14", "@types/js-beautify": "^1.14.3", "@types/js-cookie": "^3.0.2", "@types/lodash": "^4.14.182", @@ -130,6 +134,7 @@ "fuse.js": "^6.6.2", "gettext-parser": "7.0.1", "gl-matrix": "^3.4.3", + "html-webpack-plugin": "5.6.3", "idb-keyval": "^6.2.1", "invariant": "^2.2.4", "jed": "^1.1.0", @@ -192,14 +197,10 @@ "@eslint/compat": "^1.2.7", "@eslint/eslintrc": "^3.3.0", "@eslint/js": "^9.22.0", - "@mdx-js/loader": "^3.1.0", - "@mdx-js/mdx": "^3.1.0", - "@pmmmwh/react-refresh-webpack-plugin": "0.5.16", "@sentry-internal/rrweb-types": "2.34.0", "@sentry/jest-environment": "6.0.0", "@sentry/profiling-node": "9.16.1", "@styled/typescript-styled-plugin": "^1.0.1", - "@swc/plugin-emotion": "9.0.4", "@tanstack/eslint-plugin-query": "^5.66.1", "@testing-library/dom": "10.4.0", "@testing-library/jest-dom": "6.6.3", @@ -225,7 +226,6 @@ "eslint-plugin-typescript-sort-keys": "^3.3.0", "eslint-plugin-unicorn": "^57.0.0", "globals": "^15.14.0", - "html-webpack-plugin": "5.6.3", "jest": "29.7.0", "jest-canvas-mock": "^2.5.2", "jest-environment-jsdom": "29.7.0", @@ -279,10 +279,11 @@ "diff-docs": "yarn install-api-docs && ts-node api-docs/openapi-diff.ts", "deref-api-docs": "ts-node api-docs/index.ts tests/apidocs/openapi-spectacular.json tests/apidocs/openapi-derefed.json", "build-chartcuterie-config": "node --experimental-strip-types config/build-chartcuterie.ts", - "build-acceptance-rspack": "CODECOV_ENABLE_BA=false IS_ACCEPTANCE_TEST=1 NODE_ENV=production rspack", - "build-acceptance-webpack": "CODECOV_ENABLE_BA=false IS_ACCEPTANCE_TEST=1 NODE_ENV=production webpack", "build-acceptance": "yarn build-acceptance-rspack", - "build-production": "NODE_ENV=production webpack --mode production", + "build-acceptance-webpack": "CODECOV_ENABLE_BA=false IS_ACCEPTANCE_TEST=1 NODE_ENV=production webpack", + "build-acceptance-rspack": "CODECOV_ENABLE_BA=false IS_ACCEPTANCE_TEST=1 NODE_ENV=production rspack", + "build-production": "yarn build-production-rspack", + "build-production-webpack": "NODE_ENV=production webpack --mode production", "build-production-rspack": "NODE_ENV=production rspack --mode production", "build": "NODE_OPTIONS=--max-old-space-size=4096 webpack", "build-rspack": "NODE_OPTIONS=--max-old-space-size=4096 rspack", diff --git a/rspack.config.ts b/rspack.config.ts index 0e1e3a247b05b5..24108a1eb453f3 100644 --- a/rspack.config.ts +++ b/rspack.config.ts @@ -203,6 +203,9 @@ const swcReactLoaderConfig: RuleSetRule['options'] = { const appConfig: Configuration = { mode: WEBPACK_MODE, target: 'browserslist', + // Fail on first error instead of continuing to build + // https://rspack.rs/config/other-options#bail + bail: IS_PRODUCTION, entry: { /** * Main Sentry SPA diff --git a/src/sentry/build/_static_assets.py b/src/sentry/build/_static_assets.py index bc3eb2262cdffa..dc5630fd700439 100644 --- a/src/sentry/build/_static_assets.py +++ b/src/sentry/build/_static_assets.py @@ -24,8 +24,8 @@ def _cmd(*cmd: str) -> None: _cmd("yarn", "install", "--production", "--frozen-lockfile", "--quiet") _cmd("yarn", "tsc", "-p", "config/tsconfig.build.json") - _cmd("yarn", "build-production", "--bail") - _cmd("yarn", "build-chartcuterie-config", "--bail") + _cmd("yarn", "build-production") + _cmd("yarn", "build-chartcuterie-config") def main() -> int: diff --git a/yarn.lock b/yarn.lock index 610ebf9b547e48..cfcee7e33ee69d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4374,10 +4374,10 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@29.5.12": - version "29.5.12" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.12.tgz#7f7dc6eb4cf246d2474ed78744b05d06ce025544" - integrity sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw== +"@types/jest@29.5.14": + version "29.5.14" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.14.tgz#2b910912fa1d6856cadcd0c1f95af7df1d6049e5" + integrity sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ== dependencies: expect "^29.0.0" pretty-format "^29.0.0"