Skip to content

Webpack2 Fix #7

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

Closed
wants to merge 1 commit into from
Closed

Webpack2 Fix #7

wants to merge 1 commit into from

Conversation

jhnsnc
Copy link

@jhnsnc jhnsnc commented Apr 22, 2017

Addresses #5 (error occurring with webpack2)

Problem

I was having the same type of errors when trying to set up this loader with webpack2 (i.e. tr.on is not a function). I was just trying to hook up my shaders to run through glslify.

      {
        test: /\.(glsl|vert|v|frag|f)$/,
        loader: 'ify-loader'
      },

Direct Solution

It seems that webpack 2 goes ahead and takes care of a lot of the loading/sequencing behind the scenes, so we get strings for the transforms/tr on line 64 instead of Buffers(?).

Best Solution = ?

@hughsk Perhaps you can let me know if the fix I came up with is actually a good idea. I'm fairly new to webpack/browserify/glslify and I'm not sure what I might be breaking with this "fix". But perhaps this might help you identify the right solution faster.

This "fix" unblocks my development locally for now, but my usage is very simple with default options.

@jeevan-scienaptic
Copy link

Kindly merge this PR.

@glorp47
Copy link

glorp47 commented Jul 20, 2017

^^^ Seconded

@rreusser rreusser mentioned this pull request Jul 25, 2017
@rreusser
Copy link
Contributor

rreusser commented Jul 25, 2017

This PR does not seem to work for me. In the sense that it might fix some things but breaks the other tests. I've submitted a PR with a failing test using glslify #8. Seeing if I can figure out the fix…

I might have the wrong config though. Bottom line: I think order to get this fixed, what's required is focus on getting it tested :)

@rreusser
Copy link
Contributor

rreusser commented Jul 25, 2017

I don't have a fix yet, but the problem seems to center on the fact that glslify returns a string instead of a transform stream or something. The result is that it expects to be able to chain the transforms but can't insert a string into the mix. The solution seems to be to handle string output separately and work it into the array of transforms, but I haven't yet figured out how to do that.

@etpinard
Copy link
Collaborator

I don't have a fix yet, but the problem seems to center on the fact that glslify

Which version of glslify? I remember hearing that glslify was broken before their v6 push.

@rreusser
Copy link
Contributor

@etpinard Most recent, I believe. My strategy: insert console.log(typeof source) right here.

@rreusser rreusser mentioned this pull request Sep 15, 2017
3 tasks
@bpostlethwaite
Copy link
Collaborator

superseded by #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants