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/import #45

Merged
merged 3 commits into from
Aug 31, 2017
Merged

Fix/import #45

merged 3 commits into from
Aug 31, 2017

Conversation

alexeyMohnatkin
Copy link
Contributor

@alexeyMohnatkin alexeyMohnatkin commented Jul 28, 2017

This change is Reviewable

@alexeyMohnatkin
Copy link
Contributor Author

#40

@justin808
Copy link
Member

@alexfedoseev Please review.

Copy link
Member

@alex35mil alex35mil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments.

// if import path starts with / resolve from project root or webpack.context
if ((/^\//).test(oldImportPath)) {
return path.join(rootContext, oldImportPath);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a common pattern to write imports like this? It looks confusing.

src/loader.js Outdated
@@ -48,6 +48,8 @@ module.exports = function(source) {
);
}

const rootContext = webpack.options.context || process.cwd();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is webpackConfigContext on line 42.

@alex35mil alex35mil merged commit c19ac91 into shakacode:master Aug 31, 2017
@kieran
Copy link

kieran commented Sep 23, 2017

can we release this fix to npm?

@alex35mil
Copy link
Member

@kieran Published 1.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants