Commit 5e591455 authored by Tina's avatar Tina Committed by GitHub

fix: Revert "build: upgrade to webpack 5 (#6459)" (#6566)

Revert "build: upgrade to webpack 5 (#6459)"

This reverts commit ec547ab1.
parent ec547ab1
/* eslint-env node */ /* eslint-env node */
const { VanillaExtractPlugin } = require('@vanilla-extract/webpack-plugin') const { VanillaExtractPlugin } = require('@vanilla-extract/webpack-plugin')
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin')
const { execSync } = require('child_process') const { execSync } = require('child_process')
const MiniCssExtractPlugin = require('mini-css-extract-plugin') const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const path = require('path') const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin')
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin') const { DefinePlugin, IgnorePlugin } = require('webpack')
const { DefinePlugin, IgnorePlugin, ProvidePlugin } = require('webpack')
const commitHash = execSync('git rev-parse HEAD').toString().trim() const commitHash = execSync('git rev-parse HEAD').toString().trim()
const isProduction = process.env.NODE_ENV === 'production' const isProduction = process.env.NODE_ENV === 'production'
...@@ -14,11 +12,6 @@ const isProduction = process.env.NODE_ENV === 'production' ...@@ -14,11 +12,6 @@ const isProduction = process.env.NODE_ENV === 'production'
// Omit them from production builds, as they slow down the feedback loop. // Omit them from production builds, as they slow down the feedback loop.
const shouldLintOrTypeCheck = !isProduction const shouldLintOrTypeCheck = !isProduction
function getCacheDirectory(cacheName) {
// Include the trailing slash to denote that this is a directory.
return `${path.join(__dirname, 'node_modules/.cache/', cacheName)}/`
}
module.exports = { module.exports = {
babel: { babel: {
plugins: [ plugins: [
...@@ -51,13 +44,8 @@ module.exports = { ...@@ -51,13 +44,8 @@ module.exports = {
pluginOptions(eslintConfig) { pluginOptions(eslintConfig) {
return Object.assign(eslintConfig, { return Object.assign(eslintConfig, {
cache: true, cache: true,
cacheLocation: getCacheDirectory('eslint'), cacheLocation: 'node_modules/.cache/eslint/',
ignorePath: '.gitignore', ignorePath: '.gitignore',
// Use our own eslint/plugins/config, as overrides interfere with caching.
// This ensures that `yarn start` and `yarn lint` share one cache.
eslintPath: require.resolve('eslint'),
resolvePluginsRelativeTo: null,
baseConfig: null,
}) })
}, },
}, },
...@@ -67,13 +55,11 @@ module.exports = { ...@@ -67,13 +55,11 @@ module.exports = {
jest: { jest: {
configure(jestConfig) { configure(jestConfig) {
return Object.assign(jestConfig, { return Object.assign(jestConfig, {
cacheDirectory: getCacheDirectory('jest'), transform: {
transform: Object.assign(jestConfig.transform, { '\\.css\\.ts$': './vanilla.transform.cjs',
// Transform vanilla-extract using its own transformer. ...jestConfig.transform,
// See https://sandroroth.com/blog/vanilla-extract-cra#jest-transform. },
'\\.css\\.ts$': '@vanilla-extract/jest-transform', cacheDirectory: 'node_modules/.cache/jest',
}),
// Use @uniswap/conedison's build directly, as jest does not support its exports.
transformIgnorePatterns: ['@uniswap/conedison/format', '@uniswap/conedison/provider'], transformIgnorePatterns: ['@uniswap/conedison/format', '@uniswap/conedison/provider'],
moduleNameMapper: { moduleNameMapper: {
'@uniswap/conedison/format': '@uniswap/conedison/dist/format', '@uniswap/conedison/format': '@uniswap/conedison/dist/format',
...@@ -83,16 +69,8 @@ module.exports = { ...@@ -83,16 +69,8 @@ module.exports = {
}, },
}, },
webpack: { webpack: {
plugins: [ plugins: [new VanillaExtractPlugin({ identifiers: 'short' })],
// react-markdown requires path to be global, and Webpack 5 does polyfill node globals, so we polyfill it.
new ProvidePlugin({ process: 'process/browser' }),
// vanilla-extract has poor performance on M1 machines with 'debug' identifiers, so we use 'short' instead.
// See https://vanilla-extract.style/documentation/integrations/webpack/#identifiers for docs.
// See https://github.com/vanilla-extract-css/vanilla-extract/issues/771#issuecomment-1249524366.
new VanillaExtractPlugin({ identifiers: 'short' }),
],
configure: (webpackConfig) => { configure: (webpackConfig) => {
// Configure webpack plugins:
webpackConfig.plugins = webpackConfig.plugins webpackConfig.plugins = webpackConfig.plugins
.map((plugin) => { .map((plugin) => {
// Extend process.env with dynamic values (eg commit hash). // Extend process.env with dynamic values (eg commit hash).
...@@ -109,16 +87,10 @@ module.exports = { ...@@ -109,16 +87,10 @@ module.exports = {
plugin.options.ignoreOrder = true plugin.options.ignoreOrder = true
} }
// Disable TypeScript's config overwrite, as it interferes with incremental build caching.
// This ensures that `yarn start` and `yarn typecheck` share one cache.
if (plugin.constructor.name == 'ForkTsCheckerWebpackPlugin') {
delete plugin.options.typescript.configOverwrite
}
return plugin return plugin
}) })
.filter((plugin) => { .filter((plugin) => {
// Case sensitive paths are already enforced by TypeScript. // Case sensitive paths are enforced by TypeScript.
// See https://www.typescriptlang.org/tsconfig#forceConsistentCasingInFileNames. // See https://www.typescriptlang.org/tsconfig#forceConsistentCasingInFileNames.
if (plugin instanceof CaseSensitivePathsPlugin) return false if (plugin instanceof CaseSensitivePathsPlugin) return false
...@@ -128,64 +100,20 @@ module.exports = { ...@@ -128,64 +100,20 @@ module.exports = {
return true return true
}) })
// Configure webpack resolution: // We're currently on Webpack 4.x which doesn't support the `exports` field in package.json.
webpackConfig.resolve = Object.assign(webpackConfig.resolve, { // Instead, we need to manually map the import path to the correct exports path (eg dist or build folder).
plugins: webpackConfig.resolve.plugins.map((plugin) => { // See https://github.com/webpack/webpack/issues/9509.
// Allow vanilla-extract in production builds. webpackConfig.resolve.alias['@uniswap/conedison'] = '@uniswap/conedison/dist'
// This is necessary because create-react-app guards against external imports.
// See https://sandroroth.com/blog/vanilla-extract-cra#production-build.
if (plugin instanceof ModuleScopePlugin) {
plugin.allowedPaths.push(path.join(__dirname, 'node_modules/@vanilla-extract/webpack-plugin'))
}
return plugin
}),
// react-markdown requires path to be importable, and Webpack 5 does resolve node globals, so we resolve it.
fallback: { path: require.resolve('path-browserify') },
})
// Configure webpack transpilation (create-react-app specifies transpilation rules in a oneOf):
webpackConfig.module.rules[1].oneOf = webpackConfig.module.rules[1].oneOf.map((rule) => {
// The fallback rule (eg for dependencies).
if (rule.loader && rule.loader.match(/babel-loader/) && !rule.include) {
// Allow not-fully-specified modules so that legacy packages are still able to build.
rule.resolve = { fullySpecified: false }
// The class properties transform is required for @uniswap/analytics to build.
rule.options.plugins.push('@babel/plugin-proposal-class-properties')
}
return rule
})
// Configure webpack optimization: // Configure webpack optimization:
webpackConfig.optimization = Object.assign( webpackConfig.optimization.splitChunks = Object.assign(webpackConfig.optimization.splitChunks, {
webpackConfig.optimization, // Cap the chunk size to 5MB.
isProduction // react-scripts suggests a chunk size under 1MB after gzip, but we can only measure maxSize before gzip.
? { // react-scripts also caps cacheable chunks at 5MB, which gzips to below 1MB, so we cap chunk size there.
splitChunks: { // See https://github.com/facebook/create-react-app/blob/d960b9e/packages/react-scripts/config/webpack.config.js#L713-L716.
// Cap the chunk size to 5MB. maxSize: 5 * 1024 * 1024,
// react-scripts suggests a chunk size under 1MB after gzip, but we can only measure maxSize before gzip.
// react-scripts also caps cacheable chunks at 5MB, which gzips to below 1MB, so we cap chunk size there.
// See https://github.com/facebook/create-react-app/blob/d960b9e/packages/react-scripts/config/webpack.config.js#L713-L716.
maxSize: 5 * 1024 * 1024,
// Optimize over all chunks, instead of async chunks (the default), so that initial chunks are also optimized.
chunks: 'all',
},
}
: {}
)
// Configure webpack caching:
webpackConfig.cache = Object.assign(webpackConfig.cache, {
cacheDirectory: getCacheDirectory('webpack'),
}) })
// Ignore failed source mappings to avoid spamming the console.
// Source mappings for a package will fail if the package does not provide them, but the build will still succeed,
// so it is unnecessary (and bothersome) to log it. This should be turned off when debugging missing sourcemaps.
// See https://webpack.js.org/loaders/source-map-loader#ignoring-warnings.
webpackConfig.ignoreWarnings = [/Failed to parse source map/]
return webpackConfig return webpackConfig
}, },
}, },
......
import { Token } from '@uniswap/sdk-core' import { Token } from '@uniswap/sdk-core'
import { AddressMap } from '@uniswap/smart-order-router' import { AddressMap } from '@uniswap/smart-order-router'
import MulticallJSON from '@uniswap/v3-periphery/artifacts/contracts/lens/UniswapInterfaceMulticall.sol/UniswapInterfaceMulticall.json' import { abi as MulticallABI } from '@uniswap/v3-periphery/artifacts/contracts/lens/UniswapInterfaceMulticall.sol/UniswapInterfaceMulticall.json'
import NFTPositionManagerJSON from '@uniswap/v3-periphery/artifacts/contracts/NonfungiblePositionManager.sol/NonfungiblePositionManager.json' import { abi as NFTPositionManagerABI } from '@uniswap/v3-periphery/artifacts/contracts/NonfungiblePositionManager.sol/NonfungiblePositionManager.json'
import { useWeb3React } from '@web3-react/core' import { useWeb3React } from '@web3-react/core'
import { MULTICALL_ADDRESS, NONFUNGIBLE_POSITION_MANAGER_ADDRESSES as V3NFT_ADDRESSES } from 'constants/addresses' import { MULTICALL_ADDRESS, NONFUNGIBLE_POSITION_MANAGER_ADDRESSES as V3NFT_ADDRESSES } from 'constants/addresses'
import { isSupportedChain, SupportedChainId } from 'constants/chains' import { isSupportedChain, SupportedChainId } from 'constants/chains'
...@@ -43,11 +43,11 @@ function useContractMultichain<T extends BaseContract>( ...@@ -43,11 +43,11 @@ function useContractMultichain<T extends BaseContract>(
} }
export function useV3ManagerContracts(chainIds: SupportedChainId[]): ContractMap<NonfungiblePositionManager> { export function useV3ManagerContracts(chainIds: SupportedChainId[]): ContractMap<NonfungiblePositionManager> {
return useContractMultichain<NonfungiblePositionManager>(V3NFT_ADDRESSES, NFTPositionManagerJSON.abi, chainIds) return useContractMultichain<NonfungiblePositionManager>(V3NFT_ADDRESSES, NFTPositionManagerABI, chainIds)
} }
export function useInterfaceMulticallContracts(chainIds: SupportedChainId[]): ContractMap<UniswapInterfaceMulticall> { export function useInterfaceMulticallContracts(chainIds: SupportedChainId[]): ContractMap<UniswapInterfaceMulticall> {
return useContractMultichain<UniswapInterfaceMulticall>(MULTICALL_ADDRESS, MulticallJSON.abi, chainIds) return useContractMultichain<UniswapInterfaceMulticall>(MULTICALL_ADDRESS, MulticallABI, chainIds)
} }
type PriceMap = { [key: CurrencyKey]: number | undefined } type PriceMap = { [key: CurrencyKey]: number | undefined }
......
import { CurrencyAmount, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Token } from '@uniswap/sdk-core'
import IUniswapV3PoolStateJSON from '@uniswap/v3-core/artifacts/contracts/interfaces/pool/IUniswapV3PoolState.sol/IUniswapV3PoolState.json' import { abi as IUniswapV3PoolStateABI } from '@uniswap/v3-core/artifacts/contracts/interfaces/pool/IUniswapV3PoolState.sol/IUniswapV3PoolState.json'
import { computePoolAddress, Pool, Position } from '@uniswap/v3-sdk' import { computePoolAddress, Pool, Position } from '@uniswap/v3-sdk'
import { V3_CORE_FACTORY_ADDRESSES } from 'constants/addresses' import { V3_CORE_FACTORY_ADDRESSES } from 'constants/addresses'
import { SupportedChainId } from 'constants/chains' import { SupportedChainId } from 'constants/chains'
...@@ -118,7 +118,7 @@ export default function useMultiChainPositions(account: string, chains = DEFAULT ...@@ -118,7 +118,7 @@ export default function useMultiChainPositions(account: string, chains = DEFAULT
// Combines PositionDetails with Pool data to build our return type // Combines PositionDetails with Pool data to build our return type
const fetchPositionInfo = useCallback( const fetchPositionInfo = useCallback(
async (positionDetails: PositionDetails[], chainId: SupportedChainId, multicall: UniswapInterfaceMulticall) => { async (positionDetails: PositionDetails[], chainId: SupportedChainId, multicall: UniswapInterfaceMulticall) => {
const poolInterface = new Interface(IUniswapV3PoolStateJSON.abi) as UniswapV3PoolInterface const poolInterface = new Interface(IUniswapV3PoolStateABI) as UniswapV3PoolInterface
const tokens = await getTokens( const tokens = await getTokens(
positionDetails.flatMap((details) => [details.token0, details.token1]), positionDetails.flatMap((details) => [details.token0, details.token1]),
chainId chainId
......
import { Interface } from '@ethersproject/abi' import { Interface } from '@ethersproject/abi'
import { BigintIsh, Currency, Token } from '@uniswap/sdk-core' import { BigintIsh, Currency, Token } from '@uniswap/sdk-core'
import IUniswapV3PoolStateJSON from '@uniswap/v3-core/artifacts/contracts/interfaces/pool/IUniswapV3PoolState.sol/IUniswapV3PoolState.json' import { abi as IUniswapV3PoolStateABI } from '@uniswap/v3-core/artifacts/contracts/interfaces/pool/IUniswapV3PoolState.sol/IUniswapV3PoolState.json'
import { computePoolAddress } from '@uniswap/v3-sdk' import { computePoolAddress } from '@uniswap/v3-sdk'
import { FeeAmount, Pool } from '@uniswap/v3-sdk' import { FeeAmount, Pool } from '@uniswap/v3-sdk'
import { useWeb3React } from '@web3-react/core' import { useWeb3React } from '@web3-react/core'
...@@ -11,7 +11,7 @@ import { useMemo } from 'react' ...@@ -11,7 +11,7 @@ import { useMemo } from 'react'
import { V3_CORE_FACTORY_ADDRESSES } from '../constants/addresses' import { V3_CORE_FACTORY_ADDRESSES } from '../constants/addresses'
import { IUniswapV3PoolStateInterface } from '../types/v3/IUniswapV3PoolState' import { IUniswapV3PoolStateInterface } from '../types/v3/IUniswapV3PoolState'
const POOL_STATE_INTERFACE = new Interface(IUniswapV3PoolStateJSON.abi) as IUniswapV3PoolStateInterface const POOL_STATE_INTERFACE = new Interface(IUniswapV3PoolStateABI) as IUniswapV3PoolStateInterface
// Classes are expensive to instantiate, so this caches the recently instantiated pools. // Classes are expensive to instantiate, so this caches the recently instantiated pools.
// This avoids re-instantiating pools as the other pools in the same request are loaded. // This avoids re-instantiating pools as the other pools in the same request are loaded.
......
import { Interface } from '@ethersproject/abi' import { Interface } from '@ethersproject/abi'
import { Currency, CurrencyAmount } from '@uniswap/sdk-core' import { Currency, CurrencyAmount } from '@uniswap/sdk-core'
import IUniswapV2PairJSON from '@uniswap/v2-core/build/IUniswapV2Pair.json' import { abi as IUniswapV2PairABI } from '@uniswap/v2-core/build/IUniswapV2Pair.json'
import { computePairAddress, Pair } from '@uniswap/v2-sdk' import { computePairAddress, Pair } from '@uniswap/v2-sdk'
import { useMultipleContractSingleData } from 'lib/hooks/multicall' import { useMultipleContractSingleData } from 'lib/hooks/multicall'
import { useMemo } from 'react' import { useMemo } from 'react'
import { V2_FACTORY_ADDRESSES } from '../constants/addresses' import { V2_FACTORY_ADDRESSES } from '../constants/addresses'
const PAIR_INTERFACE = new Interface(IUniswapV2PairJSON.abi) const PAIR_INTERFACE = new Interface(IUniswapV2PairABI)
export enum PairState { export enum PairState {
LOADING, LOADING,
......
import type { TransactionResponse } from '@ethersproject/providers' import type { TransactionResponse } from '@ethersproject/providers'
import MerkleDistributorJSON from '@uniswap/merkle-distributor/build/MerkleDistributor.json' import { abi as MERKLE_DISTRIBUTOR_ABI } from '@uniswap/merkle-distributor/build/MerkleDistributor.json'
import { CurrencyAmount, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Token } from '@uniswap/sdk-core'
import { useWeb3React } from '@web3-react/core' import { useWeb3React } from '@web3-react/core'
import { MERKLE_DISTRIBUTOR_ADDRESS } from 'constants/addresses' import { MERKLE_DISTRIBUTOR_ADDRESS } from 'constants/addresses'
...@@ -15,7 +15,7 @@ import { useTransactionAdder } from '../transactions/hooks' ...@@ -15,7 +15,7 @@ import { useTransactionAdder } from '../transactions/hooks'
import { TransactionType } from '../transactions/types' import { TransactionType } from '../transactions/types'
function useMerkleDistributorContract() { function useMerkleDistributorContract() {
return useContract(MERKLE_DISTRIBUTOR_ADDRESS, MerkleDistributorJSON.abi, true) return useContract(MERKLE_DISTRIBUTOR_ADDRESS, MERKLE_DISTRIBUTOR_ABI, true)
} }
interface UserClaimData { interface UserClaimData {
......
...@@ -6,8 +6,8 @@ import type { TransactionResponse } from '@ethersproject/providers' ...@@ -6,8 +6,8 @@ import type { TransactionResponse } from '@ethersproject/providers'
import { toUtf8String, Utf8ErrorFuncs, Utf8ErrorReason } from '@ethersproject/strings' import { toUtf8String, Utf8ErrorFuncs, Utf8ErrorReason } from '@ethersproject/strings'
// eslint-disable-next-line no-restricted-imports // eslint-disable-next-line no-restricted-imports
import { t } from '@lingui/macro' import { t } from '@lingui/macro'
import GovernorAlphaJSON from '@uniswap/governance/build/GovernorAlpha.json' import { abi as GOVERNANCE_ABI } from '@uniswap/governance/build/GovernorAlpha.json'
import UniJSON from '@uniswap/governance/build/Uni.json' import { abi as UNI_ABI } from '@uniswap/governance/build/Uni.json'
import { CurrencyAmount, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Token } from '@uniswap/sdk-core'
import { useWeb3React } from '@web3-react/core' import { useWeb3React } from '@web3-react/core'
import GOVERNOR_BRAVO_ABI from 'abis/governor-bravo.json' import GOVERNOR_BRAVO_ABI from 'abis/governor-bravo.json'
...@@ -39,11 +39,11 @@ import { TransactionType } from '../transactions/types' ...@@ -39,11 +39,11 @@ import { TransactionType } from '../transactions/types'
import { VoteOption } from './types' import { VoteOption } from './types'
function useGovernanceV0Contract(): Contract | null { function useGovernanceV0Contract(): Contract | null {
return useContract(GOVERNANCE_ALPHA_V0_ADDRESSES, GovernorAlphaJSON.abi, false) return useContract(GOVERNANCE_ALPHA_V0_ADDRESSES, GOVERNANCE_ABI, false)
} }
function useGovernanceV1Contract(): Contract | null { function useGovernanceV1Contract(): Contract | null {
return useContract(GOVERNANCE_ALPHA_V1_ADDRESSES, GovernorAlphaJSON.abi, false) return useContract(GOVERNANCE_ALPHA_V1_ADDRESSES, GOVERNANCE_ABI, false)
} }
function useGovernanceBravoContract(): Contract | null { function useGovernanceBravoContract(): Contract | null {
...@@ -55,7 +55,7 @@ const useLatestGovernanceContract = useGovernanceBravoContract ...@@ -55,7 +55,7 @@ const useLatestGovernanceContract = useGovernanceBravoContract
function useUniContract() { function useUniContract() {
const { chainId } = useWeb3React() const { chainId } = useWeb3React()
const uniAddress = useMemo(() => (chainId ? UNI[chainId]?.address : undefined), [chainId]) const uniAddress = useMemo(() => (chainId ? UNI[chainId]?.address : undefined), [chainId])
return useContract(uniAddress, UniJSON.abi, true) return useContract(uniAddress, UNI_ABI, true)
} }
interface ProposalDetail { interface ProposalDetail {
...@@ -99,7 +99,7 @@ export enum ProposalState { ...@@ -99,7 +99,7 @@ export enum ProposalState {
EXECUTED, EXECUTED,
} }
const GovernanceInterface = new Interface(GovernorAlphaJSON.abi) const GovernanceInterface = new Interface(GOVERNANCE_ABI)
// get count of all proposals made in the latest governor contract // get count of all proposals made in the latest governor contract
function useProposalCount(contract: Contract | null): number | undefined { function useProposalCount(contract: Contract | null): number | undefined {
......
import { Interface } from '@ethersproject/abi' import { Interface } from '@ethersproject/abi'
import StakingRewardsJSON from '@uniswap/liquidity-staker/build/StakingRewards.json' import { abi as STAKING_REWARDS_ABI } from '@uniswap/liquidity-staker/build/StakingRewards.json'
import { CurrencyAmount, Token } from '@uniswap/sdk-core' import { CurrencyAmount, Token } from '@uniswap/sdk-core'
import { Pair } from '@uniswap/v2-sdk' import { Pair } from '@uniswap/v2-sdk'
import { useWeb3React } from '@web3-react/core' import { useWeb3React } from '@web3-react/core'
...@@ -11,7 +11,7 @@ import { useMemo } from 'react' ...@@ -11,7 +11,7 @@ import { useMemo } from 'react'
import { DAI, UNI, USDC_MAINNET, USDT, WBTC, WRAPPED_NATIVE_CURRENCY } from '../../constants/tokens' import { DAI, UNI, USDC_MAINNET, USDT, WBTC, WRAPPED_NATIVE_CURRENCY } from '../../constants/tokens'
const STAKING_REWARDS_INTERFACE = new Interface(StakingRewardsJSON.abi) const STAKING_REWARDS_INTERFACE = new Interface(STAKING_REWARDS_ABI)
export const STAKING_GENESIS = 1600387200 export const STAKING_GENESIS = 1600387200
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
"alwaysStrict": true, "alwaysStrict": true,
"baseUrl": "src", "baseUrl": "src",
"composite": true, "composite": true,
"declarationMap": false,
"downlevelIteration": true, "downlevelIteration": true,
"esModuleInterop": true, "esModuleInterop": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
...@@ -22,7 +21,6 @@ ...@@ -22,7 +21,6 @@
"noUnusedLocals": false, "noUnusedLocals": false,
"resolveJsonModule": true, "resolveJsonModule": true,
"skipLibCheck": true, "skipLibCheck": true,
"sourceMap": true,
"strict": true, "strict": true,
"strictNullChecks": true, "strictNullChecks": true,
"target": "ESNext", "target": "ESNext",
......
/* 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 }),
}
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment