Commit 4ea7f054 by PLN (Algolia)

chore(blog): Yarn PnP install of the unified chain + jest transform fix

Adds remark-gfm/directive/parse/rehype, rehype-pretty-code, shiki,
unified, unist-util-visit; retires remark/remark-html. Under PnP there
are no real node_modules dirs — cache zips live under paths *containing*
/node_modules/, so jest's transformIgnorePatterns now only excludes the
css module mocks, keeping the ESM-only unified chain transformable.
parent 87e54ddb
No preview for this file type
...@@ -24,9 +24,13 @@ const customJestConfig = { ...@@ -24,9 +24,13 @@ const customJestConfig = {
'<rootDir>/node_modules/', '<rootDir>/node_modules/',
'<rootDir>/tests/e2e/', '<rootDir>/tests/e2e/',
], ],
// Allow JSX in tests without explicit React import if using React 17+ JSX transform // Allow JSX in tests without explicit React import if using React 17+ JSX transform.
// Under Yarn PnP there are no real node_modules dirs — dependencies live in
// cache zips whose paths *contain* /node_modules/ segments, so excluding that
// pattern would skip transforming the ESM-only unified chain. Only the css
// module mocks (handled by next/jest) stay out of the transform.
transformIgnorePatterns: [ transformIgnorePatterns: [
'/node_modules/', '^.+\\.module\\.(css|sass|scss)$',
], ],
// Make sure Jest can find our mocks // Make sure Jest can find our mocks
moduleDirectories: ['node_modules', '<rootDir>'], moduleDirectories: ['node_modules', '<rootDir>'],
......
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