Skip to content

Instantly share code, notes, and snippets.

@jcormont
Created July 15, 2019 13:20
Show Gist options
  • Save jcormont/fd735895a7efaee76763dad1c690252c to your computer and use it in GitHub Desktop.
Save jcormont/fd735895a7efaee76763dad1c690252c to your computer and use it in GitHub Desktop.
Basic TypeScript/Webpack config
{
"compilerOptions": {
"strict": true,
"module": "es2015",
"moduleResolution": "node",
"target": "es5",
"lib": ["es2015", "dom"],
"experimentalDecorators": true,
"downlevelIteration": true,
"sourceMap": true
}
}
const path = require("path");
module.exports = {
entry: {
app: path.resolve(__dirname, "app.ts")
},
output: {
filename: "[name].bundle.js",
chunkFilename: "[name].[chunkhash].bundle.js",
// set the output path here:
path: path.resolve(__dirname, "../../js")
},
resolve: {
extensions: [".ts", ".js"],
},
module: {
rules: [
{
test: /\.ts$/,
loader: "ts-loader",
options: { transpileOnly: true }
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment