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

[request] Export parseQuery #76

Closed
anseki opened this issue Mar 13, 2017 · 2 comments
Closed

[request] Export parseQuery #76

anseki opened this issue Mar 13, 2017 · 2 comments

Comments

@anseki
Copy link
Contributor

anseki commented Mar 13, 2017

Hi, thank you for the useful tool.

So, I understand that the getOptions is provided instead of the getLoaderConfig and parseQuery, in new version.
But I hope that the parseQuery is exported by new version also because that is useful for parsing other query strings e.g. context.resourceQuery.

loader-utils still has the parseQuery, and we can import it by

require(path.resolve(path.dirname(require.resolve('loader-utils')), 'parseQuery.js'))

Of course I know this is not good way.
I hope that the loader-utils exports the parseQuery and supports it.

@jhnns
Copy link
Member

jhnns commented Mar 14, 2017

Agreed. I haven't thought about that. Could you make a pull-request and add a small note to the README?

@anseki
Copy link
Contributor Author

anseki commented Mar 14, 2017

Thank you @jhnns,
Ok, I try to send PR later.
But my English is poor, and please help me if something wrong.

anseki added a commit to anseki/loader-utils that referenced this issue Mar 14, 2017
- Add `exports.parseQuery` in `lib/index.js`
- Separate `test/parseQuery.test.js` from `test/getOptions.test.js`
- Add `parseQuery` in `README.md`
jhnns pushed a commit that referenced this issue Mar 16, 2017
- Add `exports.parseQuery` in `lib/index.js`
- Separate `test/parseQuery.test.js` from `test/getOptions.test.js`
- Add `parseQuery` in `README.md`
- Fix: object is passed to loaderUtils.parseQuery in test
- Change the title of the test and example code in README
- In example code, replace `var`s with `const`

#76 #77
@jhnns jhnns closed this as completed Mar 16, 2017
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

No branches or pull requests

2 participants