Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(build): make CJS references to import X from '../operators' work … #2874

Merged
merged 1 commit into from
Sep 27, 2017

Conversation

jasonaden
Copy link
Collaborator

…correctly with SystemJS

The problem with using index.ts exports in sources is when we do something like:

import { merge as higherOrder } from '../operators';

This works fine with Node module resolution. The generated code becomes:

var operators_1 = require('../operators');

When using SystemJS and a defaultExtension configuration of js, the HTTP request becomes:

GET ROOT_URL/_cjs/operators.js

Which doesn't exist. This PR adds the operators.js file that explicitly re-exports /operators/index so SystemJS resolution will work.

@rxjs-bot
Copy link

Messages
📖

CJS: 1341.6KB, global: 739.6KB (gzipped: 138.7KB), min: 146.0KB (gzipped: 31.2KB)

Generated by 🚫 dangerJS

@coveralls
Copy link

coveralls commented Sep 27, 2017

Coverage Status

Coverage increased (+0.0003%) to 97.477% when pulling 03c0826 on jasonaden:fix_cjs into c674581 on ReactiveX:master.

@benlesh
Copy link
Member

benlesh commented Sep 27, 2017

Module systems 🤦‍♂️

@benlesh benlesh merged commit 3dd4cc4 into ReactiveX:master Sep 27, 2017
@lock
Copy link

lock bot commented Jun 6, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants