chromaui / chromatic-e2e

Archive end-to-end tests to be replayed in Storybook and Chromatic
MIT License
13 stars 3 forks source link

Fix ESM build #116

Closed tevanoff closed 3 months ago

tevanoff commented 4 months ago

Issue: #

What Changed

Fixes #88

Fix ESM build by:

How to test

skitterm commented 3 months ago

@tevanoff I just tested this locally (Cypress e2e with Vite, using ES modules), and I verified things work.

I do now see the following when running ELECTRON_EXTRA_LAUNCH_ARGS=--remote-debugging-port=9222 npx cypress run:

ELECTRON_EXTRA_LAUNCH_ARGS=--remote-debugging-port=9222 npx cypress run

DevTools listening on ws://127.0.0.1:9222/devtools/browser/06bede8f-3ebc-424b-80d2-9d7bf7324618
(node:75541) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("file%3A///Users/stevenkitterman/Library/Caches/Cypress/13.6.6/Cypress.app/Contents/Resources/app/node_modules/ts-node/esm/transpile-only.mjs", pathToFileURL("./"));'
(Use `node --trace-warnings ...` to show where the warning was created)

I believe the "experimentalWarning" part is new as of this PR. It doesn't error, just noises up the logs a bit.

tevanoff commented 3 months ago

I believe the "experimentalWarning" part is new as of this PR. It doesn't error, just noises up the logs a bit.

@skitterm oh weird, do you have an idea of what part of this PR would cause something like that?

skitterm commented 3 months ago

@skitterm oh weird, do you have an idea of what part of this PR would cause something like that?

@tevanoff I don't know which part. Let me know if you'd like me to look into that.