aboutsummaryrefslogtreecommitdiffstats
path: root/eleventy.config.js
diff options
context:
space:
mode:
author2024-06-24 14:33:28 +0530
committer2024-06-24 14:33:28 +0530
commit2784af79075c08f9ba7c3468dfda9b0920c6b4e4 (patch)
treebc601de33c0c7142a3e9e51b7984354f64953093 /eleventy.config.js
parentRearranged the project layout (diff)
downloadsudomsg-2784af79075c08f9ba7c3468dfda9b0920c6b4e4.tar
sudomsg-2784af79075c08f9ba7c3468dfda9b0920c6b4e4.tar.gz
sudomsg-2784af79075c08f9ba7c3468dfda9b0920c6b4e4.tar.bz2
sudomsg-2784af79075c08f9ba7c3468dfda9b0920c6b4e4.tar.lz
sudomsg-2784af79075c08f9ba7c3468dfda9b0920c6b4e4.tar.xz
sudomsg-2784af79075c08f9ba7c3468dfda9b0920c6b4e4.tar.zst
sudomsg-2784af79075c08f9ba7c3468dfda9b0920c6b4e4.zip
Update deps and remove minimizers to deal with CVEs
Diffstat (limited to 'eleventy.config.js')
-rw-r--r--eleventy.config.js40
1 files changed, 1 insertions, 39 deletions
diff --git a/eleventy.config.js b/eleventy.config.js
index c6d7df3..54327e7 100644
--- a/eleventy.config.js
+++ b/eleventy.config.js
@@ -8,11 +8,6 @@ import pluginWebc from "@11ty/eleventy-plugin-webc";
import { DateTime } from "luxon";
-import postcss from "postcss";
-import cssnano from 'cssnano';
-
-import htmlmin from "html-minifier";
-
export default async function(eleventyConfig) {
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
eleventyConfig.addPlugin(RenderPlugin);
@@ -39,40 +34,7 @@ export default async function(eleventyConfig) {
eleventyConfig.addPlugin(directoryOutputPlugin);
- eleventyConfig.addPlugin(pluginWebc, {
- bundlePluginOptions: {
- transforms: [
- async function(content) {
- if (this.type === 'css') {
- let result = await postcss([
- cssnano({
- preset: "default",
- })
- ]).process(content, {
- from: this.page.inputPath,
- to: null
- });
- return result.css;
- }
-
- return content;
- }
- ]
- },
- });
-
- eleventyConfig.addTransform("htmlmin", function(content) {
- if (this.page.outputPath && this.page.outputPath.endsWith(".html")) {
- let minified = htmlmin.minify(content, {
- useShortDoctype: true,
- removeComments: true,
- collapseWhitespace: true,
- });
- return minified;
- }
-
- return content;
- });
+ eleventyConfig.addPlugin(pluginWebc);
eleventyConfig.addPassthroughCopy({
"./public/": "/",