« get me outta code hell

begin the site! - scratchblocks-generator-3 - scratchblocks generator for projects made in 3.0
about summary refs log tree commit diff
path: root/webpack.config.js
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2019-12-20 17:46:21 -0400
committerFlorrie <towerofnix@gmail.com>2019-12-20 17:46:21 -0400
commit6fe5b85f8ce201d618a9c7c175d7502c2ff8c395 (patch)
treeedbe264b31213d6ee2f5087507f4f1557f17864d /webpack.config.js
parent5ec73fd9d3a6018945464565fac5de9efe05466d (diff)
begin the site!
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/webpack.config.js b/webpack.config.js
new file mode 100644
index 0000000..bca6800
--- /dev/null
+++ b/webpack.config.js
@@ -0,0 +1,33 @@
+const HtmlWebpackPlugin = require('html-webpack-plugin');
+const MiniCssExtractPlugin = require('mini-css-extract-plugin');
+const path = require('path');
+
+module.exports = {
+    entry: './src/js/main.js',
+    output: {
+        path: __dirname + '/dist',
+        filename: 'bundle.js'
+    },
+    module: {
+        rules: [
+            {
+                test: /\.css$/i,
+                use: [MiniCssExtractPlugin.loader, 'css-loader']
+            },
+            {
+                test: /\.html$/i,
+                loader: 'raw-loader'
+            }
+        ]
+    },
+    plugins: [
+        new MiniCssExtractPlugin({
+            filename: 'style.css'
+        }),
+        new HtmlWebpackPlugin({
+            hash: true,
+            template: __dirname + '/src/index.html',
+            filename: 'index.html'
+        })
+    ]
+};