Skip to content

Instantly share code, notes, and snippets.

@amazzalel-habib
Created April 7, 2019 16:57
Show Gist options
  • Save amazzalel-habib/d733c90ec4a28fca62e7bee0bb3c1e11 to your computer and use it in GitHub Desktop.
Save amazzalel-habib/d733c90ec4a28fca62e7bee0bb3c1e11 to your computer and use it in GitHub Desktop.
const path = require('path');
const htmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
mode: 'development',
entry: {
app: './src/index.tsx'
},
output: {
filename: 'bundle.[hash].js',
path: path.resolve(__dirname, 'dist')
},
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx']
},
module: {
rules: [
{
test: /.tsx?/,
loader: 'ts-loader'
}
]
},
plugins: [
new htmlWebpackPlugin({
template: './src/index.html'
})
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment