uniswap-interface-uncensored/vanilla.transform.cjs
Zach Pomerantz 87144de9c8
test: transform vanilla-extract for jest (#6425)
* fix: transform vanilla extract for jest

* lint: vanilla transform

* build: deduplicate

* test: improve transformIgnorePatterns

* fix: broken snapshot

* nits

* Update craco.config.cjs

* build: lockfile

* build: lockfile

* Update vanilla.transform.cjs
2023-04-25 12:06:58 -07:00

13 lines
583 B
JavaScript

/* eslint-env node */
/**
* @file Re-exports the vanilla-extract jest transform, so that jest can properly transform .css.ts files.
* `@vanilla-extract/jest-transform` incorrectly maps its default export, so that `import *` does not work; and expects
* the wrong shape for options, so it must be re-exported to be correctly used as a jest transform.
*/
const { default: transform } = require('@vanilla-extract/jest-transform')
module.exports = {
process: (source, filePath, options) =>
transform.process(source, filePath, { config: options, supportsStaticESM: false }),
}