From 06098b7bdd6a83f6b9cc07d2377f2a19cc0ecaa6 Mon Sep 17 00:00:00 2001 From: Philipp Eichmann Date: Fri, 21 Dec 2018 18:45:24 -0500 Subject: added code --- webpack.config.js | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 webpack.config.js (limited to 'webpack.config.js') diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 000000000..5db0f3dfd --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,52 @@ +var path = require('path'); +var webpack = require('webpack'); +const CopyWebpackPlugin = require("copy-webpack-plugin"); + +module.exports = { + devtool: 'eval', + mode: 'development', + entry: "./src/Main.tsx", + output: { + filename: "./bundle.js", + path: path.resolve(__dirname, "build") + }, + resolve: { + extensions: ['.js', '.ts', '.tsx'] + }, + module: { + rules: [{ + test: [/\.tsx?$/, /\.ts?$/,], + loader: "awesome-typescript-loader", + include: path.join(__dirname, 'src') + }, + { + test: /\.scss|css$/, + use: [ + { + loader: "style-loader" + }, + { + loader: "css-loader" + }, + { + loader: "sass-loader" + } + ] + }] + }, + plugins: [ + new CopyWebpackPlugin([{ from: "deploy", to: path.join(__dirname, "build") }]) + ], + devServer: { + compress: false, + host: "localhost", + contentBase: path.join(__dirname, 'deploy'), + port: 1050, + hot: true, + https: false, + overlay: { + warnings: true, + errors: true + } + } +}; \ No newline at end of file -- cgit v1.2.3-70-g09d2