aboutsummaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
authorMiguel Ángel Moreno <mail@migalmoreno.com>2024-12-01 13:12:25 +0100
committerMiguel Ángel Moreno <mail@migalmoreno.com>2024-12-01 13:12:25 +0100
commit3951173441bcb511c8f8ae383002e6992e6409a8 (patch)
tree97e813d9e777bd140a820abeb5fe2046ec5692d3 /webpack.config.js
parent187d65c126787ee4208c4c295b627f4800863f70 (diff)
chore: add development server for shadow-cljs
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js48
1 files changed, 26 insertions, 22 deletions
diff --git a/webpack.config.js b/webpack.config.js
index ba4fee9..8545ca0 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,15 +1,15 @@
-const path = require("path")
-const MiniCssExtractPlugin = require("mini-css-extract-plugin")
-const RemoveEmptyScriptsPlugin = require("webpack-remove-empty-scripts")
-const CopyPlugin = require("copy-webpack-plugin")
+const path = require("path");
+const MiniCssExtractPlugin = require("mini-css-extract-plugin");
+const RemoveEmptyScriptsPlugin = require("webpack-remove-empty-scripts");
+const CopyPlugin = require("copy-webpack-plugin");
module.exports = {
mode: process.env.NODE_ENV,
entry: {
- index: path.resolve(__dirname, "resources/src/styles/index.scss")
+ index: path.resolve(__dirname, "resources/src/styles/index.scss"),
},
output: {
- path: path.resolve(__dirname, "resources/public")
+ path: path.resolve(__dirname, "resources/public"),
},
plugins: [
new RemoveEmptyScriptsPlugin(),
@@ -20,10 +20,14 @@ module.exports = {
patterns: [
{
from: path.resolve(__dirname, "resources/src/icons"),
- to: "icons"
- }
- ]
- })
+ to: "icons",
+ },
+ {
+ from: path.resolve(__dirname, "resources/src/index.html"),
+ to: "index.html",
+ },
+ ],
+ }),
],
module: {
rules: [
@@ -33,22 +37,22 @@ module.exports = {
use: [
MiniCssExtractPlugin.loader,
{
- loader: 'css-loader',
+ loader: "css-loader",
options: {
- importLoaders: 1
- }
+ importLoaders: 1,
+ },
},
"postcss-loader",
- "sass-loader"
- ]
+ "sass-loader",
+ ],
},
{
test: /\.(woff|woff2|eot|ttf|otf)$/i,
- type: 'asset/resource',
+ type: "asset/resource",
generator: {
- filename: 'fonts/[hash][ext][query]'
- }
- }
- ]
- }
-}
+ filename: "fonts/[hash][ext][query]",
+ },
+ },
+ ],
+ },
+};