Are you interested in TypeScript, but not sure where to start? Like most modern web development, it can feel like there are too many options and no obvious answers.
This talk will share best practices for integrating TypeScript into both Node.js and Webpack+React/JSX workflows, how you can benefit from the features TypeScript offers, and answer common questions about TypeScript.
30. module.exports = {
entry: "./src/index.tsx",
output: {
filename: "bundle.js",
path: "./dist"
},
// Enable sourcemaps for debugging webpack's output.
devtool: “inline-source-map",
resolve: {
// Add '.ts' and '.tsx' as resolvable extensions.
extensions: [".ts", ".tsx", ".js", ".json"]
},
// Continued on next slide
https://aka.ms/nebrius-svcc18-this
31. // Continued from previous slide
module: {
rules: [
// All files with a '.ts' or '.tsx' extension will be handled by 'ts-loader'.
{ test: /.tsx?$/, use: "ts-loader", exclude: /node_modules/ }
]
}
};
https://aka.ms/nebrius-svcc18-this