Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save HansS/aa72ab692a4f548fb3fd568be82d7818 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" }
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment