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

Simplify webpack alias #2974

Merged
merged 2 commits into from
Oct 18, 2017
Merged

Conversation

jasonaden
Copy link
Collaborator

Using __dirname directly in the path-mapping.js file should be more reliable and should always be accurate. This simplifies setting up the aliases for Webpack to map to the esm distribution.

Output in the path-mapping.js file will now look like this:


"use strict"

var path = require('path');

module.exports = function() {
  return {
    "rxjs/AsyncSubject": path.resolve(__dirname, "AsyncSubject.js"),
    "rxjs/add/observable/interval": path.resolve(__dirname, "add/observable/interval.js"),
    "rxjs/util/tryCatch": path.resolve(__dirname, "util/tryCatch.js"),
    // ...
};
}

@rxjs-bot
Copy link

rxjs-bot commented Oct 18, 2017

Messages
📖

CJS: 2276.4KB, global: 746.2KB (gzipped: 120.0KB), min: 145.7KB (gzipped: 31.2KB)

Generated by 🚫 dangerJS

@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.399% when pulling b2ee797 on jasonaden:simplify_webpack_alias into a0b7362 on ReactiveX:master.

@kwonoj
Copy link
Member

kwonoj commented Oct 18, 2017

Change itself looks fine. I'd personally would capture __dirname once

function() {
  var dir = path.resolve(__dirname);
  return {
    "rxjs/AsyncSubject": path.join(dir, "AsyncSubject.js"),
}

like, but not sure how much gain it'll be honestly. probably not worth it?

@jasonaden
Copy link
Collaborator Author

@kwonoj Sounds good. I made that change.

@coveralls
Copy link

coveralls commented Oct 18, 2017

Coverage Status

Coverage remained the same at 97.399% when pulling 63c1521 on jasonaden:simplify_webpack_alias into a0b7362 on ReactiveX:master.

@kwonoj kwonoj merged commit 2e3d216 into ReactiveX:master Oct 18, 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.

4 participants