-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add support for filename [name] tags in module names. #7
Conversation
…lled file.js one could use 'exports-loader?[name]' to add 'module.exports = file;' to the file.
|
@phimonk can you please close and reopen the PR to trigger the CLA Bot again, should be working now :) |
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.
It would be better with tests, but that would be a bigger change (the project doesn't have a test setup).
We could wait till test setup is in place and look into merging after that.
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.
Given the simplicity of this particular loader, i'm going to put webpack-defaults in place now. That will solve the testing infrastructure issue.
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.
This is also going to require an addition to the readme for the additional functionality / usecase
Closing in favor of #21 due to better documentation |
If a file is called file.js one could use 'exports-loader?[name]' to add 'module.exports = file;' to the file.
Example usage in config:
This allows to use all three examples as es6 or typescript modules.