/** * Svelte markup preprocessor that strips test-only `data-testid` attributes at * compile time for production builds. * * The attribute name, value, and any `{expression}` are removed from the * template *before* Svelte compiles it, so production output carries no trace — * neither in the rendered DOM nor in the JS bundle (no `'data-testid'` string * and no attribute-setting call survive). A runtime guard could only blank the * value; this removes the attribute outright. * * The attribute is kept intact when: * - `VITE_E2E=1` is set (the e2e image / `just fe-build-e2e` build), or * - the build is not a production build (the `vite dev` server), * so Playwright and `playwright codegen` can rely on `getByTestId`. * * Only the markup *between* `