vaadin / vaadin-connect

A Vaadin Labs experiment with a secure stateless communication framework
https://vaadin.com/labs/vaadin-connect
Apache License 2.0
18 stars 5 forks source link

wrong import paths to generated data wrappers on Windows #391

Closed vlukashov closed 5 years ago

vlukashov commented 5 years ago

The TS generator on Windows generates incorrect import paths to TS wrappers for data classes.

Example on Windows (incorrect)

// @ts-ignore
import client from './connect-client.default';
import Product from '..\.\com\vaadin\polyglotdx\data\Product';

export function list(): Promise<Array<Product | null> | null> {
  return client.call('ProductEndpoint', 'list', undefined, {requireCredentials: false});
}

Same file generated on Mac OS (correct)

// @ts-ignore
import client from './connect-client.default';
import Product from './com/vaadin/polyglotdx/data/Product';

export function list(): Promise<Array<Product | null> | null> {
  return client.call('ProductEndpoint', 'list', undefined, {requireCredentials: false});
}

Steps to reproduce (on a Windows 10 machine):

Expected behavior: