Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding committed Aug 15, 2024
1 parent 51a96e9 commit ecbc5e3
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"env": {
"test": {
"plugins": ["istanbul"]
}
}
}
6 changes: 3 additions & 3 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import installCoverageTask from "@cypress/code-coverage/task";
import { defineConfig } from "cypress";
import { devServer } from "cypress-rspack-dev-server";
import { merge } from "webpack-merge";

export default defineConfig({
viewportWidth: 1280,
Expand All @@ -25,12 +26,11 @@ export default defineConfig({
return devServer({
...devServerConfig,
framework: "react",
rspackConfig: {
...require("./rspack.config").default,
rspackConfig: merge(require("./rspack.config").default, {
experiments: {
lazyCompilation: !devServerConfig.cypressConfig.isTextTerminal,
},
},
}),
});
},
specPattern: "packages/**/src/**/*.cy.{js,ts,jsx,tsx}",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"ag-grid-enterprise": "^31.3.0",
"ag-grid-react": "^31.3.0",
"axe-core": "^4.9.0",
"babel-loader": "^9.1.3",
"chromatic": "^11.3.2",
"ci-info": "^3.3.1",
"clsx": "^2.0.0",
Expand Down
14 changes: 14 additions & 0 deletions rspack.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import path from "node:path";
import { defineConfig } from "@rspack/cli";
import { version as reactVersion } from "react";

const prod = true;

Expand All @@ -15,6 +16,10 @@ export default defineConfig({
test: /\.css$/,
use: ["style-loader", "css-loader", "postcss-loader"],
},
{
test: /packages\/.*\/src\/.*\.[tj]sx?$/,
use: ["babel-loader"],
},
{
test: /\.(j|t)s$/,
exclude: [/[\\/]node_modules[\\/]/],
Expand Down Expand Up @@ -63,6 +68,15 @@ export default defineConfig({
configFile: path.resolve(__dirname, "./tsconfig.json"),
references: "auto",
},
alias: {
"cypress/react18": reactVersion.startsWith("18")
? "cypress/react18"
: "cypress/react",
"@storybook/react-dom-shim":
reactVersion.startsWith("16") || reactVersion.startsWith("17")
? "@storybook/react-dom-shim/dist/react-16"
: "@storybook/react-dom-shim",
},
extensions: ["...", ".ts", ".tsx", ".js", ".jsx", ".css"],
},
});
42 changes: 41 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5928,6 +5928,7 @@ __metadata:
ag-grid-enterprise: "npm:^31.3.0"
ag-grid-react: "npm:^31.3.0"
axe-core: "npm:^4.9.0"
babel-loader: "npm:^9.1.3"
chromatic: "npm:^11.3.2"
ci-info: "npm:^3.3.1"
clsx: "npm:^2.0.0"
Expand Down Expand Up @@ -9931,6 +9932,19 @@ __metadata:
languageName: node
linkType: hard

"babel-loader@npm:^9.1.3":
version: 9.1.3
resolution: "babel-loader@npm:9.1.3"
dependencies:
find-cache-dir: "npm:^4.0.0"
schema-utils: "npm:^4.0.0"
peerDependencies:
"@babel/core": ^7.12.0
webpack: ">=5"
checksum: 10/7086e678273b5d1261141dca84ed784caab9f7921c8c24d7278c8ee3088235a9a9fd85caac9f0fa687336cb3c27248ca22dbf431469769b1b995d55aec606992
languageName: node
linkType: hard

"babel-plugin-istanbul@npm:^6.0.0":
version: 6.1.1
resolution: "babel-plugin-istanbul@npm:6.1.1"
Expand Down Expand Up @@ -11379,6 +11393,13 @@ __metadata:
languageName: node
linkType: hard

"common-path-prefix@npm:^3.0.0":
version: 3.0.0
resolution: "common-path-prefix@npm:3.0.0"
checksum: 10/09c180e8d8495d42990d617f4d4b7522b5da20f6b236afe310192d401d1da8147a7835ae1ea37797ba0c2238ef3d06f3492151591451df34539fdb4b2630f2b3
languageName: node
linkType: hard

"common-tags@npm:^1.8.0":
version: 1.8.2
resolution: "common-tags@npm:1.8.2"
Expand Down Expand Up @@ -15134,6 +15155,16 @@ __metadata:
languageName: node
linkType: hard

"find-cache-dir@npm:^4.0.0":
version: 4.0.0
resolution: "find-cache-dir@npm:4.0.0"
dependencies:
common-path-prefix: "npm:^3.0.0"
pkg-dir: "npm:^7.0.0"
checksum: 10/52a456a80deeb27daa3af6e06059b63bdb9cc4af4d845fc6d6229887e505ba913cd56000349caa60bc3aa59dacdb5b4c37903d4ba34c75102d83cab330b70d2f
languageName: node
linkType: hard

"find-my-way@npm:^7.7.0":
version: 7.7.0
resolution: "find-my-way@npm:7.7.0"
Expand All @@ -15155,7 +15186,7 @@ __metadata:
languageName: node
linkType: hard

"find-up@npm:6.3.0":
"find-up@npm:6.3.0, find-up@npm:^6.3.0":
version: 6.3.0
resolution: "find-up@npm:6.3.0"
dependencies:
Expand Down Expand Up @@ -23060,6 +23091,15 @@ __metadata:
languageName: node
linkType: hard

"pkg-dir@npm:^7.0.0":
version: 7.0.0
resolution: "pkg-dir@npm:7.0.0"
dependencies:
find-up: "npm:^6.3.0"
checksum: 10/94298b20a446bfbbd66604474de8a0cdd3b8d251225170970f15d9646f633e056c80520dd5b4c1d1050c9fed8f6a9e5054b141c93806439452efe72e57562c03
languageName: node
linkType: hard

"pkg-types@npm:^1.0.3":
version: 1.0.3
resolution: "pkg-types@npm:1.0.3"
Expand Down

0 comments on commit ecbc5e3

Please sign in to comment.