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

bable-cli ignores folder if there are just .ts files #9099

Closed
MikeMitterer opened this issue Nov 29, 2018 · 3 comments
Closed

bable-cli ignores folder if there are just .ts files #9099

MikeMitterer opened this issue Nov 29, 2018 · 3 comments
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@MikeMitterer
Copy link

Bug Report

Current Behavior
I have a folder (tools) with two .ts files in it.

If I run BABEL_ENV=node babel --extensions ".ts, .tsx" tools
I get an empty output.

If I run BABEL_ENV=node babel --extensions ".ts, .tsx" tools/fs-test
the file (it is a .ts file) gets compiled.

If I use webpack it works.

Expected behavior/code
Should compile the whole dir into one file like it is mentioned here: https://babeljs.io/docs/en/babel-cli/#compile-directories

Babel Configuration (.babelrc, package.json, cli command)

{
  "presets": [
    ["@babel/preset-env", {
      "targets": {
        "browsers": ["last 2 versions"]
      }
    }],
    "@babel/typescript"
  ],
  "plugins": [
    "@babel/proposal-class-properties",
    "@babel/proposal-object-rest-spread"
  ],
  "env": {
    "node": {
      "presets": [
        ["@babel/preset-env", {
          "targets": {
            "esmodules": true,
            "node": "current"
          },
          "modules": "auto"
        }]
      ]
    }
  }
}

Environment

  • Babel version(s): 7.1.5 (@babel/core 7.1.6)

  • Node/npm version: v11.2.0

  • OS: ProductName: Mac OS X, ProductVersion: 10.11.6

  • How you are using Babel: [e.g. cli, register, loader]

BTW: The whole bable/TS-Thing works great!!! (except this little issue)

@babel-bot
Copy link
Collaborator

Hey @MikeMitterer! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

@wtgtybhertgeghgtwtg
Copy link
Contributor

I think you're missing --out-dir.

@loganfsmyth
Copy link
Member

You get no output because of #8668, but yeah really you want --out-dir

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Mar 1, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

4 participants