Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Make sure the
translations
helper can be imported by vite, web…
…pack and cypress When imported in vite config it will be executed in ESM context where dynamic require of modules is not available. But when converted to ES module it works in vite config + webpack config, but not in Cypress config. Because our package type is `commonjs` so Typescript files are executed as CommonJS Typescript, so the Cypress config can not require "import" an ES module. Solutions: Either set out package to `type: "module"` or as done here rewrite all require calls to dynamic import which is available on CommonJS *and* ES module. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
- Loading branch information