aboutsummaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
authorRadu <radu@pml4t.net>2023-11-24 16:52:57 -0500
committerRadu <radu@pml4t.net>2023-11-24 22:17:59 -0500
commit290f849c64c9f198f09b592daa48ecdae957375f (patch)
treefab417d5837cde3cd9b4db54dd61d59ca098a69d /webpack.config.js
parentef17d1d29212f5dc0218bfca1c30709e5a35f7b2 (diff)
Support GFM using `remarked` and fix some bugs
- This avoids edge cases in the primitive parser I wrote. - Add KaTeX stylesheet (cause of rendering issues, not Pronto). - Bundle with Webpack.
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/webpack.config.js b/webpack.config.js
new file mode 100644
index 0000000..90dfeb6
--- /dev/null
+++ b/webpack.config.js
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+const path = require("path");
+const { LicenseWebpackPlugin } = require("license-webpack-plugin");
+
+module.exports = {
+ entry: "./page.ts",
+ devtool: "source-map",
+ module: {
+ rules: [
+ { test: /\.ts$/i, use: "ts-loader" },
+ { test: /\.css$/i, use: ["style-loader", "css-loader"] },
+ { test: /\.(woff|woff2|eot|ttf|otf)$/i, type: "asset/resource" },
+ {
+ test: /\.json$/i,
+ use: "file-loader?name=[name].[ext]",
+ type: "javascript/auto",
+ },
+ ],
+ },
+ plugins: [new LicenseWebpackPlugin({ stats: { warnings: false } })],
+ output: {
+ path: path.resolve(__dirname, "dist"),
+ filename: "page.js",
+ },
+};