Skip to content
JC Franco edited this page Jan 23, 2025 · 5 revisions

tags: [tips, tricks, dev]

Tips

  1. For speedier CI test troubleshooting, you can use the exclude prop under the test object in vite.config.ts to only run a specific suite.

    test: {
      exclude: ["(/__tests__/.*|(\\.|/)modal.e2e)\\.[jt]sx?$"]
    }

    Just remember to remove it at some point before merging. 😅

  2. You can use Chromatic builds + online code editors (e.g., CodePen) for extra testing without having to update storybook stories or publish to NPM. Example: https://codepen.io/jcfranco/pen/RwYRyGW This is no longer possible with the latest Storybook + Vite build

  3. To be able to use npm link our packages with vite builds, make sure to add the following to vite.config.ts:

    optimizeDeps: {
      exclude: ["@esri/calcite-components"]
    }

    see https://dev.to/hontas/using-vite-with-linked-dependencies-37n7