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

File extensions / JSX #11

@jamiewinder

Description

@jamiewinder

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"
        })
    ]
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions