Skip to content

Commit

Permalink
Update configs
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding committed Aug 15, 2024
1 parent 5e4da20 commit 51a96e9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
8 changes: 7 additions & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
video: false,
component: {
setupNodeEvents(on, config) {
installCoverageTask(on, config);
// installCoverageTask(on, config);
//Setting up a log task to allow logging to the console during an axe test because console.log() does not work directly in a test
on("task", {
log(message: string) {
Expand All @@ -25,6 +25,12 @@ export default defineConfig({
return devServer({
...devServerConfig,
framework: "react",
rspackConfig: {
...require("./rspack.config").default,
experiments: {
lazyCompilation: !devServerConfig.cypressConfig.isTextTerminal,
},
},
});
},
specPattern: "packages/**/src/**/*.cy.{js,ts,jsx,tsx}",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"copy:icon:css": "yarn workspace @salt-ds/icons copy:css",
"copy:countries:css": "yarn workspace @salt-ds/countries copy:css",
"test": "vitest",
"test:components": "cypress run --component --browser chrome --headless",
"test:components": "cypress run --component --browser chrome",
"test:components:local": "cypress open --component --browser electron",
"prettier": "prettier --write .",
"prettier:ci": "prettier --check .",
Expand Down
7 changes: 4 additions & 3 deletions rspack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ export default defineConfig({
target: "browserslist",
module: {
rules: [
{
test: /\.png$/,
type: "asset",
},
{
test: /\.css$/,
use: ["style-loader", "css-loader", "postcss-loader"],
Expand Down Expand Up @@ -61,7 +65,4 @@ export default defineConfig({
},
extensions: ["...", ".ts", ".tsx", ".js", ".jsx", ".css"],
},
experiments: {
lazyCompilation: true,
},
});

0 comments on commit 51a96e9

Please sign in to comment.