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

New loader parameter syntax, loader support. #12

Merged
merged 3 commits into from
Mar 3, 2017

Conversation

gannondigital
Copy link
Contributor

Hey, I'd be happy to maintain this project. I've been using a fork of baggage-loader at work for a while, with a bunch of customizations; I think it's one of the most useful loaders out there.

This pull establishes a new syntax for the loader's query params, to support greater configurability in the future. Seemed like it was needed, based on the open issues (and my own use cases). The old syntax is still supported, but not for new functionality.

Added support for specifying loaders, per-require, resolving issue #1. Because of the change in syntax, I bumped the version to 1.0.0 and updated the README (also tried to make it a little clearer).

@deepsweet
Copy link
Owner

thanks! you are a maintainer with collaborator's access now. let me know when you'll be ready to publish something to NPM. 👍

@jsg2021
Copy link

jsg2021 commented Feb 2, 2017

Hope this gets merged soon :)

index.js Outdated
if (typeof query[filePath] === 'object') {
var fileConfig = query[filePath];
var loaderStringForFile = fileConfig.loaders || '';
loadersForFile = loaderStringForFile.replace(/\*/g, '!') + '!';
Copy link

Choose a reason for hiding this comment

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

if you don't conditionally apply this, the loader will prefix all imports with ! voiding your webpack config's rules. (I've merged your branch into my fork and fixed it)

@deepsweet
Copy link
Owner

so, what about maintaining this?

@jsg2021
Copy link

jsg2021 commented Mar 3, 2017

i would be happy to, if that question was directed at me.

@gannondigital gannondigital merged commit 41dfbd1 into deepsweet:master Mar 3, 2017
@gannondigital gannondigital deleted the issue-1-new-syntax branch March 3, 2017 05:23
@gannondigital
Copy link
Contributor Author

Thanks @jsg2021, incorporated that conditional. @deepsweet sorry for the delay; I emailed you a little while ago -- wasn't sure if you wanted to review/approve/etc. or if I should just run with it. Anyway, ready to publish to NPM but have never done so before. How do I publish it?

@jsg2021
Copy link

jsg2021 commented Mar 3, 2017

@gannondigital awesome. to make this compatible with webpack2, you should update the peer deps, and check out my fork. i've already done the work.

@deepsweet
Copy link
Owner

@gannondigital https://docs.npmjs.com/getting-started/publishing-npm-packages + http://semver.org/

write your NPM username here when you are ready to try, I'll give you an access.

@gannondigital
Copy link
Contributor Author

@deepsweet Hey, ready to publish stuff -- my NPM username is gannondigital

@deepsweet
Copy link
Owner

done

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.

3 participants