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

Fix error when adding @babel/preset-env without options #350

Merged
merged 1 commit into from
Dec 3, 2019

Conversation

n3tr
Copy link
Contributor

@n3tr n3tr commented Nov 26, 2019

Adding @babel/preset-env without options to .babelrc will cause an error

.babelrc

{
  "presets": ["@babel/preset-env"]
}

Error

✖ Failed to compile
(babel plugin) TypeError: Cannot read property 'exclude' of undefined
TypeError: Cannot read property 'exclude' of undefined
    at Object.config (/Users/jirat.ki/Code/lab/tsdxLib/node_modules/tsdx/dist/babelPluginTsdx.js:98:127)
    at Object.transform (/Users/jirat.ki/Code/lab/tsdxLib/node_modules/rollup-plugin-babel/dist/rollup-plugin-babel.cjs.js:197:26)
    at /Users/jirat.ki/Code/lab/tsdxLib/node_modules/rollup/dist/rollup.js:12084:25

@Kosai106
Copy link

Kosai106 commented Dec 1, 2019

Just faced this issue myself - Would like seeing this merged. 🙏

@jaredpalmer jaredpalmer merged commit a1a0dcb into jaredpalmer:master Dec 3, 2019
sebald added a commit to sebald/tsdx that referenced this pull request Dec 19, 2019
* master: (26 commits)
  (deps/lint): upgrade @typescript-eslint to support ?. and ?? (jaredpalmer#377)
  (ci): add a lint job so PRs will require passing lint (jaredpalmer#378)
  (clean): remove .rts_cache_* from storybook gitignore (jaredpalmer#375)
  Add optional chaining and nullish coalescing operators support (jaredpalmer#370)
  Added Storybook template (jaredpalmer#318)
  (fix/ci): GitHub Actions should run on PRs as well
  (fix/format): formatting of jaredpalmer#366 didn't pass lint
  Add prepare script to generated project (jaredpalmer#334)
  default jest to watch mode when not in CI (jaredpalmer#366)
  (fix): respect tsconfig esModuleInterop flag (jaredpalmer#327)
  fix: minor typo
  update rollup deps and plugins
  update to ts 3.7
  Remove unnecessary yarn install command in GH action
  update README.md
  update README.md
  Use node_modules/.cache/... as cacheRoot (jaredpalmer#329)
  fix(lint): Only default to src test if they exist (jaredpalmer#344)
  Fix error when providing babel/preset-env without options (jaredpalmer#350)
  Replaced some sync methods for their async version
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants