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: properly handle webpack loaders #19

Closed
wants to merge 1 commit into from
Closed

Conversation

ariporad
Copy link
Collaborator

Fixes #17.

@Pomax
Copy link

Pomax commented Jan 20, 2016

A possible test for this would be to have a file with something like:

var emptyTransform = function(source, filename) {
  return "module.exports = {};\n";
};

addHook(emptyTransform, ['text']);

require('file!something.text?name=thing.with.dot');

@Pomax
Copy link

Pomax commented Jan 20, 2016

hm, it looks like this won't work, as pirates kicks in after the base file consultation goes through, so node will try to get the file content, then hand it over to pirates, which will fail on webpack syntax.

There are ways around this (loader instructions in a webpack.config.js for instance) so I guess it might be a case of "document that this won't work, rather than fix"?

@ariporad
Copy link
Collaborator Author

@Pomax: Ok, I'll close this, would you mine submitting a PR to document it? You seem to know a good bit more about this than me.

@ariporad ariporad closed this Jan 20, 2016
@ariporad ariporad deleted the fix/webpack branch January 20, 2016 21:02
@Pomax
Copy link

Pomax commented Jan 20, 2016

will do

@Pomax
Copy link

Pomax commented Jan 20, 2016

filed as #21

@ariporad ariporad restored the fix/webpack branch July 30, 2016 04:55
@danez danez deleted the fix/webpack branch April 6, 2017 12:13
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.

None yet

2 participants