Skip to content

Instantly share code, notes, and snippets.

@HansS
Created May 14, 2018 09:12
Show Gist options
  • Select an option

  • Save HansS/e33db31d7db21faefdbbe7a832d8e8c1 to your computer and use it in GitHub Desktop.

Select an option

Save HansS/e33db31d7db21faefdbbe7a832d8e8c1 to your computer and use it in GitHub Desktop.
Webpack Config Template for Typescript
module.exports = {
mode: "development",
devtool: "inline-source-map",
entry: "./app.ts",
output: {
filename: "bundle.js"
},
resolve: {
// Add `.ts` and `.tsx` as a resolvable extension.
extensions: [".ts", ".tsx", ".js"]
},
module: {
rules: [
// all files with a `.ts` or `.tsx` extension will be handled by `ts-loader`
{ test: /\.tsx?$/, loader: "ts-loader" }
]
}
};
@HansS
Copy link
Author

HansS commented May 14, 2018

webpack config for typescript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment