Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

File extensions / JSX #11

Closed
jamiewinder opened this issue Dec 15, 2015 · 2 comments
Closed

File extensions / JSX #11

jamiewinder opened this issue Dec 15, 2015 · 2 comments
Labels

Comments

@jamiewinder
Copy link

I'm porting a Typescript project over to Rollup, and am hoping to use this plugin to make the compile process straightforward. I'm facing two issues which I can't see referenced in the docs:

  • JSX. I seem to get syntax errors on lines with JSX syntax. Is this supported?
  • File extensions. It seems I have to alter my imports to have a file extension, otherwise I get an error saying the file wasn't found. Is there a way around this?

Here is my config:

var typescript = require('rollup-plugin-typescript');
var ts = require('typescript');

module.exports = {
    entry: 'src/index.tsx',
    dest: 'dist/test.js',
    format: 'es6',
    plugins: [
        typescript({
            target: ts.ScriptTarget.ES2015,
            jsx: "react"
        })
    ]
};
@Victorystick
Copy link
Contributor

@jamiewinder Sorry for the delay. The issue of file extensions should be addressed by #17. I haven't gotten ts.transpileModule to accept jsx yet, but I'm on it.

@Victorystick
Copy link
Contributor

The issue of file extensions should be fixed in version 0.3.0. I'll create a new issue for JSX.

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

No branches or pull requests

2 participants