qpa-client/client/webpack.config.ts

39 lines
827 B
TypeScript
Raw Normal View History

2019-04-19 19:12:05 +02:00
import * as webpack from 'webpack'
import * as path from "path"
import * as HtmlWebpackPlugin from 'html-webpack-plugin'
const config: webpack.Configuration = {
entry: './App/index.tsx',
resolve: {
extensions: [".js", ".jsx", ".ts", ".tsx"]
},
module: {
rules: [
{
exclude: path.resolve(__dirname, "node_modules"),
test: /\.tsx?$/,
use: {
loader: "babel-loader",
options: {
presets: [
"@babel/typescript",
"@babel/react"
],
plugins: [].filter(Boolean)
}
}
} ]
},
devtool: '#@source-map',
output: {
path: path.resolve(__dirname, './dist'),
filename: 'bundle.js'
},
plugins: [new HtmlWebpackPlugin({
title: "blabla",
})]
}
export default config