diff --git a/spec/systemjs-compatibility-spec.ts b/spec/systemjs-compatibility-spec.ts new file mode 100644 index 0000000000..6d9adf4a8e --- /dev/null +++ b/spec/systemjs-compatibility-spec.ts @@ -0,0 +1,7 @@ +// all these imports verify that our ESM imports and exports are SystemJS compatible after transpilation +// this is done by relying on the tsc type-checker configured with "moduleResolution" set to "classic" +import * as rxjs from '../src/index'; +import * as rxjsAjax from '../src/ajax'; +import * as rxjsOperators from '../src/operators'; +import * as rxjsTesting from '../src/testing'; +import * as rxjsWebsocket from '../src/websocket'; diff --git a/src/ajax.ts b/src/ajax.ts new file mode 100644 index 0000000000..3e8295ad1c --- /dev/null +++ b/src/ajax.ts @@ -0,0 +1 @@ +export * from './ajax/index'; \ No newline at end of file diff --git a/src/internal/Rx.ts b/src/internal/Rx.ts index df75853838..874df92534 100644 --- a/src/internal/Rx.ts +++ b/src/internal/Rx.ts @@ -176,7 +176,7 @@ import { rxSubscriber } from './symbol/rxSubscriber'; import { iterator } from './symbol/iterator'; import { observable } from './symbol/observable'; -import * as _operators from './operators'; +import * as _operators from './operators/index'; export const operators = _operators; diff --git a/src/operators.ts b/src/operators.ts new file mode 100644 index 0000000000..1065b7f29e --- /dev/null +++ b/src/operators.ts @@ -0,0 +1 @@ +export * from './operators/index'; \ No newline at end of file diff --git a/src/testing.ts b/src/testing.ts new file mode 100644 index 0000000000..83ed436d50 --- /dev/null +++ b/src/testing.ts @@ -0,0 +1 @@ +export * from './testing/index'; \ No newline at end of file diff --git a/src/websocket.ts b/src/websocket.ts new file mode 100644 index 0000000000..a7f9ecd9f6 --- /dev/null +++ b/src/websocket.ts @@ -0,0 +1 @@ +export * from './websocket/index'; \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 3db6ed4538..a8f687b579 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,7 @@ "noImplicitReturns": true, "noImplicitThis": true, "suppressImplicitAnyIndexErrors": true, - "moduleResolution": "node", + "moduleResolution": "classic", // we intentionally use "classic" module resolution to be SystemJS-compatible after transpilation "stripInternal": true, "target": "es5", "outDir": "./.out",