From 7257e1abb9624d2577090a9606ae74e37c12be53 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Thu, 26 Nov 2020 11:28:29 -0800 Subject: [PATCH] perf(docs): ignore node_modules in markdown preprocessor --- docs/svelte.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/svelte.config.js b/docs/svelte.config.js index c1ae0be0..cad6f06f 100644 --- a/docs/svelte.config.js +++ b/docs/svelte.config.js @@ -127,6 +127,7 @@ module.exports = { extensions: [".svelte", ".svx"], preprocess: [ require("svelte-preprocess")({ + typescript: false, replace: [ ["process.env.VERSION", JSON.stringify(pkg.version)], ["process.env.NODE_ENV", JSON.stringify(NODE_ENV)], @@ -148,6 +149,7 @@ module.exports = { }), { markup({ content, filename }) { + if (/node_modules/.test(filename)) return null; if (filename.endsWith(".svx") && filename.match(/pages\/(recipes)/)) { const toc = [];