-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: function based transformer presets
- Loading branch information
1 parent
53b1874
commit fb56af9
Showing
12 changed files
with
173 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
import type { TransformOptions } from '@babel/core'; | ||
import type { TransformerOptionsPreset } from '../../types'; | ||
|
||
const getCommon = (): TransformOptions => ({ | ||
minified: false, | ||
compact: false, | ||
sourceMaps: false, | ||
babelrc: false, | ||
highlightCode: !process.stdin.isTTY, | ||
}); | ||
const getCommonPreset = (): TransformerOptionsPreset<TransformOptions> => { | ||
return (_context) => ({ | ||
minified: false, | ||
compact: false, | ||
sourceMaps: false, | ||
babelrc: false, | ||
highlightCode: !process.stdin.isTTY, | ||
}); | ||
}; | ||
|
||
export { getCommon }; | ||
const getFullyTransformPreset = | ||
(): TransformerOptionsPreset<TransformOptions> => { | ||
return (context) => ({ | ||
root: context.root, | ||
babelrc: true, | ||
}); | ||
}; | ||
|
||
export { getCommonPreset, getFullyTransformPreset }; |
Oops, something went wrong.
fb56af9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
react-native-esbuild-web – ./
rne-web-demo.vercel.app
react-native-esbuild-web-leegeunhyeok.vercel.app
react-native-esbuild-web-git-master-leegeunhyeok.vercel.app
fb56af9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report
Test suite run success
83 tests passing in 10 suites.
Report generated by 🧪jest coverage report action from fb56af9