aboutsummaryrefslogtreecommitdiff
path: root/svelte.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'svelte.config.js')
-rw-r--r--svelte.config.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/svelte.config.js b/svelte.config.js
index c56f5d3..d5b3f97 100644
--- a/svelte.config.js
+++ b/svelte.config.js
@@ -1,5 +1,20 @@
+
+
+
+/*** IMPORT ------------------------------------------- ***/
+
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
+import { sveltePreprocess } from "svelte-preprocess";
+
+/*** EXPORT ------------------------------------------- ***/
+
+const isPackaging = process.argv[1]?.endsWith("svelte-package.js")
+ || process.env.npm_lifecycle_event === "package"
+ || process.env.npm_lifecycle_event === "prepublishOnly"
+ || process.env.npm_lifecycle_event === "publish";
export default {
- preprocess: vitePreprocess()
+ preprocess: isPackaging
+ ? [sveltePreprocess({ scss: { silenceDeprecations: ["legacy-js-api"] } })]
+ : [vitePreprocess()]
};