-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Fix/import #45
Conversation
@alexfedoseev Please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few comments.
src/utils/rewriteImports.js
Outdated
// if import path starts with / resolve from project root or webpack.context | ||
if ((/^\//).test(oldImportPath)) { | ||
return path.join(rootContext, oldImportPath); | ||
} |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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.
can we release this fix to npm? |
@kieran Published |
This change is