Skip to content

Relative import with targeting to es6 #92

Closed
@Strate

Description

@Strate

I got stuck with loading relative modules and targeting ts compiler to es6.
Example 1:

import dep = require('./file.ts') // causes error TS1202: Import assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'import * as ns from "mod"', 'import {a} from "mod"' or 'import d from "mod"' instead.

import dep from './file.ts' // causes error TS2307: Cannot find module './file.ts'.

Changing target to es5 makes both of variances work. Any ideas to get them work on es6 target?

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