Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Transforming const to the configured target environment #82

Closed
2 tasks done
pepicrft opened this issue Jun 1, 2021 · 0 comments
Closed
2 tasks done

Transforming const to the configured target environment #82

pepicrft opened this issue Jun 1, 2021 · 0 comments
Labels
bug: pending triage Something doesn't seem to be working, but hasn't been verified

Comments

@pepicrft
Copy link

pepicrft commented Jun 1, 2021

  • I have tried upgrading by running bundle update vite_ruby.
  • I have read the troubleshooting section before opening an issue.

Description 📖

When running bin/vite build on this repository, I get the following error that I can't trace back to the root of the issue:

Building with Vite ⚡️
 > vite.config.ts:12:0: error: Transforming const to the configured target environment ("es5") is not supported yet
    12 │ const version = "0.1.0";
       ╵ ~~~~~
   tsconfig.json:11:14: note: The target environment was set to "es5" here
    11 │     "target": "es5",
       ╵               ~~~~~

 > vite.config.ts:13:0: error: Transforming const to the configured target environment ("es5") is not supported yet
    13 │ const isDistEnv = process.env.RAILS_ENV === "production";
       ╵ ~~~~~
   tsconfig.json:11:14: note: The target environment was set to "es5" here
    11 │     "target": "es5",
       ╵               ~~~~~

 > vite.config.ts:15:0: error: Transforming const to the configured target environment ("es5") is not supported yet
    15 │ const bugsnagOptions = {
       ╵ ~~~~~
   tsconfig.json:11:14: note: The target environment was set to "es5" here
    11 │     "target": "es5",
       ╵               ~~~~~

failed to load config from /Users/pepibumur/src/github.com/craftweg/buildify/projects/app/vite.config.ts
error during build:
Error: Build failed with 3 errors:
vite.config.ts:12:0: error: Transforming const to the configured target environment ("es5") is not supported yet
vite.config.ts:13:0: error: Transforming const to the configured target environment ("es5") is not supported yet
vite.config.ts:15:0: error: Transforming const to the configured target environment ("es5") is not supported yet

For some reason esbuild is trying to parse the tsconfig.json and vite.config.ts file.

Reproduction 🐞

  1. Clone this repository
  2. cd into projects/app.
  3. Install dependencies bundle install && yarn install.
  4. Run bin/vite build
Vite Ruby Info ``` Running via Spring preloader in process 56570 bin/vite present?: true vite_ruby: 1.2.11 vite_rails: 2.0.11 rails: 6.1.3.2 node: v16.0.0 npm: 7.10.0 yarn: 1.22.10 pnpm: ruby: ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-darwin20]

installed packages:
buildify-app@ /Users/pepibumur/src/github.com/craftweg/buildify/projects/app
├─┬ @vitejs/plugin-legacy@1.4.1
│ └── vite@2.3.5 deduped
├─┬ vite-plugin-bugsnag@1.0.2
│ └── vite@2.3.5 deduped
├─┬ vite-plugin-ruby@2.0.4
│ └── vite@2.3.5 deduped
└── vite@2.3.5

</details>


@pepicrft pepicrft added the bug: pending triage Something doesn't seem to be working, but hasn't been verified label Jun 1, 2021
Repository owner locked and limited conversation to collaborators Jun 1, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug: pending triage Something doesn't seem to be working, but hasn't been verified
Projects
None yet
Development

No branches or pull requests

2 participants