Skip to content

Commit

Permalink
build: switch from ts-jest to esbuild
Browse files Browse the repository at this point in the history
esbuild does not support automatic jsx/runtime,
so the `import React from 'react'` is still needed.

refs: evanw/esbuild#334
  • Loading branch information
aladdin-add committed Dec 24, 2021
1 parent e0716a0 commit 15cbf71
Show file tree
Hide file tree
Showing 5 changed files with 3,755 additions and 222 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
testEnvironment: 'jsdom',
transform: {
'.(ts|tsx)$': require.resolve('ts-jest/dist'),
'.(ts|tsx)$': 'esbuild-jest',
".+\\.(css|styl|less|sass|scss|png|jpg|svg|ttf|woff|woff2)$": "jest-transform-stub"
},
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$'],
Expand Down
Loading

0 comments on commit 15cbf71

Please sign in to comment.