Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

prefer existing names for dependencies, over require$$x #178

Merged
merged 1 commit into from
Mar 10, 2017
Merged

Conversation

Rich-Harris
Copy link
Contributor

This addresses #176 — common cases like this...

var x = require('x');

...will become like this...

import x from 'x';

...instead of this:

import require$$0 from 'x';
// ...
var x = require$$0;

It involves a bit of extra work, since we need to prevent this from happening in cases where x is reassigned (legally in CommonJS but illegally in ES modules), but I reckon it's worth it — the converted code is cleaner.

@Rich-Harris Rich-Harris merged commit 76b3e9a into master Mar 10, 2017
@Rich-Harris Rich-Harris deleted the gh-176 branch March 10, 2017 19:29
@StreetStrider
Copy link

Thanks for effort on such kind of a feature.

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

2 participants