@goesvt/svelte-env

1.0.5 • Public • Published

svelte withe environment variables

The sveltejs/template starter project doesn’t allow the use of environment variables out-of-the-box.

Env can be used by using this module with svelte.



how to use


installation

npm install @goesvt/svelte-use-env

useage

Just following below code.

in rollup.config.js file

...

import insertEnv from "@goesvt/svelte-use-env";

const production = !process.env.ROLLUP_WATCH;

...

export default {
    ...,
    plugins : [
        ...,
        insertEnv(),     // insert here !!
    ],
    ...
}

Package Sidebar

Install

npm i @goesvt/svelte-env

Weekly Downloads

7

Version

1.0.5

License

MIT

Unpacked Size

1.51 kB

Total Files

3

Last publish

Collaborators

  • goesnow