svelte-cloudinary icon indicating copy to clipboard operation
svelte-cloudinary copied to clipboard

[Bug] Remove `VITE_` for SvelteKit .env variable

Open mislam opened this issue 10 months ago • 3 comments

Bug Report

Describe the bug

After upgrading from v1.2.3 to v1.3.1, I noticed the .env variable changed: from PUBLIC_CLOUDINARY_CLOUD_NAME to -> VITE_PUBLIC_CLOUDINARY_CLOUD_NAME

The use of VITE_ is counter-intuitive for SvelteKit project. It makes more sense to do one of the 3 options:

Option 1: Revert back to PUBLIC_CLOUDINARY_CLOUD_NAME, or Option 2: Let the developer decide on naming and have a config/init to manually initialize the component using the custom env variable name. Option 3. Let both naming (with and w/o VITE_) work, if some people prefer to must have VITE_.

Is this a regression?

Did this behaviour used to work in the previous version? Yes, the previous version in which this bug was not present was: v1.2.3

Steps To Reproduce the error

  1. Create a SvelteKit project
  2. npm install svelte-cloudinary v1.2.3
  3. Use .env variable PUBLIC_CLOUDINARY_CLOUD_NAME
  4. Then upgrade the package to v1.3.1

Expected behaviour

Like all other SvelteKit .env variable naming convention, the VITE_ prefix should be removed.

Your environment

  • OS: macOS v12.7.4
  • Node version: v20.10.0
  • pnpm version: v8.15.5
  • Browser name and version: Brave v1.64.113

mislam avatar Mar 29 '24 03:03 mislam