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

[bug]Nested import json file in vite.config.ts no more working since vite 2.1.0. #2543

Closed
3 tasks done
Ynewtime opened this issue Mar 16, 2021 · 1 comment · Fixed by #2573 · May be fixed by slumericanBx/vite#1
Closed
3 tasks done

[bug]Nested import json file in vite.config.ts no more working since vite 2.1.0. #2543

Ynewtime opened this issue Mar 16, 2021 · 1 comment · Fixed by #2573 · May be fixed by slumericanBx/vite#1

Comments

@Ynewtime
Copy link

⚠️ IMPORTANT ⚠️ Please do not ignore this template. If you do, your issue will be closed immediately.

Describe the bug

Nested import json file in vite.config.ts no more working since vite 2.1.0.

Reproduction

Repo: https://github.com/Ynewtime/import-json-fail

  1. npm init @vitejs/app
  2. Create a config/config.json file and a src/config.ts file importing the previous one
  3. import src/config.ts in vite.config.ts
  4. yarn dev

System Info

  • vite version: 2.1.0
  • Operating System: MacBook Air (M1, 2020)
  • Node version: v15.11.0
  • Package manager (npm/yarn/pnpm) and version: pnpm 5.18.7

Logs (Optional if provided reproduction)

  1. Run vite or vite build with the --debug flag.
  2. Provide the error log here.
@yyx990803
Copy link
Member

/cc @egoist I believe this is caused by the switch to bundling config with esbuild.

yyx990803 pushed a commit that referenced this issue Mar 19, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants