Skip to content

Instantly share code, notes, and snippets.

@cyan33
Created November 21, 2017 17:15
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 cyan33/0f97fa20a2c25c39e464b2464d9359fd to your computer and use it in GitHub Desktop.
Save cyan33/0f97fa20a2c25c39e464b2464d9359fd to your computer and use it in GitHub Desktop.
ts webpack
module.exports = {
entry: "./src/index.tsx",
output: {
filename: "bundle.js"
},
resolve: {
// Add '.ts' and '.tsx' as a resolvable extension.
extensions: ["", ".webpack.js", ".web.js", ".ts", ".tsx", ".js"]
},
module: {
loaders: [
// 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