
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
react-native-typescript-transformer-dgjoy
Advanced tools
TypeScript transformer for react-native
A transformer to use for loading TypeScript files with react-native >= 0.45
It currently uses Babel as a secondary compilation step for simplicity's sake, and to enable synthetic default imports. A planned feature is to allow bypassing babel for people who don't use synthetic default imports.
yarn add --dev react-native-typescript-transformer typescript
Make sure your tsconfig.json has the following:
{
"compilerOptions": {
"target": "es2015",
"module": "es2015",
"jsx": "react-native",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true
}
}
"module"
can be "commonjs"
if you don't care about allowing synthetic default imports (in which case that field can also be false
)
"target"
can probably be anything supported by your babel setup, I suppose.
"jsx"
can also be "preserve"
, they are functionally identical if you don't emit files.
Add this to your rn-cli.config.js (make one if you don't have one already):
module.exports = {
getTransformModulePath() {
return require.resolve('react-native-typescript-transformer')
},
getSourceExts() {
return ['ts', 'tsx'];
}
}
Alternatively, pass these cli args when you start the packager:
--transformer node_modules/react-native-typescript-transformer --sourceExts ts,tsx
And you should be you good to go!
MIT
FAQs
TypeScript transformer for react-native
We found that react-native-typescript-transformer-dgjoy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.