aboutsummaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js52
1 files changed, 52 insertions, 0 deletions
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