Skip to content

Babel isn't running -- need to add TS, TSX extensions to rollup-plugin-babel config #95

@jakegavin

Description

@jakegavin

Current Behavior

The babel plugin doesn't run on transpiled ts code so features like lodash import renaming, pure call annotation, and the dev expression plugin don't work.

Example bundle: https://github.com/jakegavin/tsdx-babel-issue/blob/master/dist/tsdx-babel-issue.cjs.development.js#L3

Babel doesn't run on the output of the rollup-plugin-typescript2 unless "ts" is specified as an extension in the in the babel config. This is discussed here: ezolenko/rollup-plugin-typescript2#108

Expected behavior

Babel should run on output of the typescript plugin.

Example bundle: https://github.com/jakegavin/tsdx-babel-issue/blob/build-with-fixed-tsdx/dist/tsdx-babel-issue.cjs.development.js#L3

Suggested solution(s)

Add "ts" and "tsx" extensions to the babel config. PR: #96

Additional context

Your environment

Software Version(s)
TSDX 0.5.8
TypeScript 3.4.5
Browser chrome
npm/Yarn npm
Operating System macos

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions