Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapter-static documentation references process.env.NODE_ENV which no longer works #7417

Closed
Glench opened this issue Oct 28, 2022 · 0 comments · Fixed by #7480
Closed

adapter-static documentation references process.env.NODE_ENV which no longer works #7417

Glench opened this issue Oct 28, 2022 · 0 comments · Fixed by #7480
Labels
documentation Improvements or additions to documentation

Comments

@Glench
Copy link

Glench commented Oct 28, 2022

Describe the bug

When using the example code in this section of the README, process.env.NODE_ENV is undefined when access in svelte.config.js.

It'd be great if this section of the README was updated with the correct code that would make Github Pages work in dev and production modes, for example. I tried to use vite's import.meta.env but that didn't have the required information either unfortunately.

Reproduction

You can test this with a console.log(process.env.NODE_ENV) in svelte.config.js. The bug is that it's undefined whereas before it was development when run with npm run dev.

Logs

No response

System Info

System:
    OS: macOS 12.6
    CPU: (4) x64 Intel(R) Core(TM) i3-1000NG4 CPU @ 1.10GHz
    Memory: 163.72 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 17.5.0 - /usr/local/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 8.4.1 - /usr/local/bin/npm
  Browsers:
    Brave Browser: 90.1.24.82
    Chrome: 106.0.5249.119
    Edge: 107.0.1418.24
    Firefox: 105.0.3
    Safari: 16.0
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.85
    @sveltejs/adapter-static: ^1.0.0-next.46 => 1.0.0-next.46
    @sveltejs/kit: next => 1.0.0-next.526
    svelte: ^3.44.0 => 3.52.0
    vite: ^3.1.0 => 3.2.1

Severity

blocked

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants