l'env fonctionne enfin pour qsvelte

This commit is contained in:
batche
2023-01-03 00:22:53 +01:00
parent 12b2ec8ce8
commit f00fef39ba
18 changed files with 83 additions and 130 deletions

View File

@@ -6,8 +6,13 @@ import { terser } from 'rollup-plugin-terser';
import sveltePreprocess from 'svelte-preprocess';
import typescript from '@rollup/plugin-typescript';
import css from 'rollup-plugin-css-only';
import replace from '@rollup/plugin-replace';
import dotenv from 'dotenv';
const production = !process.env.ROLLUP_WATCH;
dotenv.config();
function serve() {
let server;
@@ -47,6 +52,10 @@ export default {
dev: !production
}
}),
replace({
'process.env.WEBSITE_HOST': `'${process.env.WEBSITE_HOST}'`,
'process.env.WEBSITE_PORT': `'${process.env.WEBSITE_PORT}'`,
}),
// we'll extract any component CSS out into
// a separate file - better for performance
css({ output: 'bundle.css' }),