Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
zdila committed Jun 27, 2023
1 parent 198abca commit 70a44db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions replace-env-vars.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import "dotenv/config";
import replace from "replace-in-file";

// console.log(process.env);

replace({
files: ["dist.svelte/*.svelte", "dist.svelte/*.ts", "dist.svelte/*.js"],
from: /\bimport\.meta\.env\.(\w+)/g,
to: (_, name) => JSON.stringify(process.env[name]),
}).catch((err) => {
console.error(err);

process.exit(1);
});

0 comments on commit 70a44db

Please sign in to comment.