Skip to content

Instantly share code, notes, and snippets.

@grabbou
Created March 31, 2017 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grabbou/40ca1fcb37fa1e329712ad241f33197a to your computer and use it in GitHub Desktop.
Save grabbou/40ca1fcb37fa1e329712ad241f33197a to your computer and use it in GitHub Desktop.
Haul config for getting Typescript running
/**
* 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