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

CLI doesn't work on typescript files without a babelrc / Setting babelConfig in transform() has no effect #1218

Open
mx-rd opened this issue Feb 22, 2023 · 0 comments
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked cat: typings 👮 Typescript types related issues needs: complete repro 🖥️ Issue need to have complete repro provided

Comments

@mx-rd
Copy link

mx-rd commented Feb 22, 2023

Environment

  • Linaria version: "@linaria/babel-preset": "^4.4.3"
  • Node.js version: v17.4.0
  • OS: MacOS 13.1

Description

  1. Running the CLI on a typescript file will fail when there is no babel config present in the folder, setting @babel/preset-typescript

  2. Calling transform(), exported from @linaria/babel-preset directly with a babelConfig parameter required seems to have no effect. A present babel config is the only apparent solution.

In both cases, some error relating to whatever typescript syntax is used in the file is thrown.

Reproducible Demo

  1. Create an index.ts with some type defintion / typescript syntax.
  2. Run any @linaria/cli command or the transform function
@mx-rd mx-rd added bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided needs: triage 🏷 Issue needs to be checked and prioritized labels Feb 22, 2023
@github-actions github-actions bot added cat: typings 👮 Typescript types related issues and removed needs: triage 🏷 Issue needs to be checked and prioritized labels Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked cat: typings 👮 Typescript types related issues needs: complete repro 🖥️ Issue need to have complete repro provided
Projects
None yet
Development

No branches or pull requests

1 participant