howyoucanhelp.us/webpack.config.js

32 lines
562 B
JavaScript
Raw Normal View History

2018-08-10 22:50:38 +00:00
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
2018-08-10 22:50:38 +00:00
module.exports = {
entry: {
main: './src/index.ts',
worker: './src/service-worker.ts',
},
2018-08-10 22:50:38 +00:00
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
}
]
},
plugins: [
new HtmlWebpackPlugin({
template: "./index.html"
}),
],
2018-08-10 22:50:38 +00:00
resolve: {
extensions: [ '.tsx', '.ts', '.js' ]
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
2018-08-10 22:50:38 +00:00
}
};