( evaluator: Evaluator, linariaConfig: PartialOptions, stage?: Stage )
| 66 | const cachesForCleanup = new Set<TransformCacheCollection>(); |
| 67 | |
| 68 | const getLinariaConfig = ( |
| 69 | evaluator: Evaluator, |
| 70 | linariaConfig: PartialOptions, |
| 71 | stage?: Stage |
| 72 | ): PluginOptions => { |
| 73 | const { features: customFeatures, ...restConfig } = linariaConfig; |
| 74 | |
| 75 | return loadWywOptions({ |
| 76 | extensions: [ |
| 77 | '.cjs', |
| 78 | '.cts', |
| 79 | '.js', |
| 80 | '.jsx', |
| 81 | '.mjs', |
| 82 | '.mts', |
| 83 | '.ts', |
| 84 | '.tsx', |
| 85 | '.json', |
| 86 | ], |
| 87 | displayName: true, |
| 88 | rules: [ |
| 89 | { |
| 90 | action: evaluator, |
| 91 | }, |
| 92 | { |
| 93 | test: /[\\/]node_modules[\\/](?!@linaria)/, |
| 94 | action: 'ignore', |
| 95 | }, |
| 96 | { |
| 97 | test: /\.json$/, |
| 98 | action: 'ignore', |
| 99 | }, |
| 100 | ], |
| 101 | features: { |
| 102 | ...customFeatures, |
| 103 | happyDOM: false, |
| 104 | softErrors: false, |
| 105 | }, |
| 106 | stage, |
| 107 | ...restConfig, |
| 108 | }); |
| 109 | }; |
| 110 | |
| 111 | async function transform( |
| 112 | originalCode: string, |
no outgoing calls
no test coverage detected
searching dependent graphs…