Created
March 31, 2017 13:18
-
-
Save grabbou/40ca1fcb37fa1e329712ad241f33197a to your computer and use it in GitHub Desktop.
Haul config for getting Typescript running
This file contains hidden or 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 is Webpack config you need in order to get | |
* Typescript up and running | |
*/ | |
module.exports = ({ platform }, { module }) => ({ | |
// We have two files, index.ios.tsx and index.android.tsx | |
entry: `./index.${platform}.tsx`, | |
// We extend default loaders by prepending `ts-loader` | |
module: { | |
...module, | |
rules: [ | |
{ | |
test: /\.tsx?$/, | |
loader: 'ts-loader' | |
}, | |
...module.rules, | |
] | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment