Skip to content

Usage with Bublé and it's JSX feature #3

@piotr-cz

Description

@piotr-cz

In my project I'm using React and it's JSX format and Bublé trough rollup-plugin-buble with JSX support for compilation.
For some reason using rollup-plugin-root-import to resolve paths breaks Bublé transpilation functionality and Rollup throws an error (In configuration I had to add extensions: ['.js','.jsx']):

Error parsing xxx.jsx: Unexpected token (16:6) in xxx.jsx (this is where JSX markup is used).

There is no error when importing .js files, only the .jsx ones.

I've tried to debug this plugin and it seems that paths are correctly resolved however error pops up only when trying to resolve paths fro jsx files.

It looks like the JSX compilation is omitted for file paths resolved from root.

Tried with:

  • rollup-plugin-root-import: 0.2.1
  • rollup: 0.36.4, 0.37.0
  • buble: 0.14.3, 0.15.1
  • rollup-plugin-buble: 0.14.0, 0.15.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions