Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

README should include documentation on use of babelrc: false option #510

Closed
mattdsteele opened this issue Oct 30, 2017 · 0 comments
Closed

Comments

@mattdsteele
Copy link

See babel/babel-loader#428 for a more detailed description of the issue.

The tl;dr is that if you're using babelOptions in awesomeTypescriptLoaderOptions, anything in .babelrc will take precedence. This breaks expected usage for scenarios where you need two sets of Babel configs (example: one for Webpack, one for your build tools).

This loader works fine so long as you set `"babelrc": false:

  "awesomeTypescriptLoaderOptions": {
    "useBabel": true,
    "babelOptions": {
      "babelrc": false, /* Important line */
      "presets": [
        ["env", { "targets": "last 2 versions, ie 11", "modules": false }]
      ]
    }
  }  

But this wasn't documented and I had to dig around to discover the option.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant