-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Closed as not planned
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists
Description
Describe the bug
import(`./${'foo'}/index.js`) fails (it complains that it can't decypher the dynamic import) but import(`./`+'foo'+`/index.js`) is fine. This happens when importing from a replaced environment variable.
Reproduction
see above
Steps to reproduce
use a defined-d variable in an import
System Info
System:
OS: Linux 6.1 NixOS 24.05 (Uakari) 24.05 (Uakari)
CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
Memory: 1.85 GB / 15.20 GB
Container: Yes
Shell: 5.2.21 - /run/current-system/sw/bin/bash
Binaries:
Node: 20.9.0 - /nix/store/a1hckfqzyys4rfgbdy5kmb5w0zdr55i5-nodejs-20.9.0/bin/node
npm: 10.1.0 - /nix/store/a1hckfqzyys4rfgbdy5kmb5w0zdr55i5-nodejs-20.9.0/bin/npm
pnpm: 8.15.1 - /nix/store/3kw9mkkwjd69jaqp5la66g10y7wckq2s-corepack-nodejs-20.9.0/bin/pnpm
npmPackages:
vite: ^5.0.12 => 5.0.12Used Package Manager
pnpm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists