We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent acec5e6 commit b3497baCopy full SHA for b3497ba
.changeset/silly-panthers-talk.md
@@ -0,0 +1,5 @@
1
+---
2
+"@sveltejs/package": patch
3
4
+
5
+fix: improve warning when encountering import.meta.env
packages/package/src/validate.js
@@ -87,8 +87,8 @@ export function _create_validator(options) {
87
88
if (uses_import_meta) {
89
warnings.push(
90
- 'Avoid usage of `import.meta.env` in your code. It requires a bundler to work. ' +
91
- 'Consider using packages like `esm-env` instead which provide cross-bundler-compatible environment variables.'
+ 'Avoid usage of `import.meta.env` in your code. It only works in apps bundled with Vite. ' +
+ 'Consider using packages like `esm-env` instead which works with all bundlers or without bundling.'
92
);
93
}
94
0 commit comments