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: Upgrade to raw-loader 2 (like jupyter lab) #881

Merged
merged 1 commit into from Sep 16, 2019

Conversation

maartenbreddels
Copy link
Member

This wayt we can load the shaders the same way. This will allow bqplot to use WebGL within Jupyter lab.

raw-loader <2 was using common-js, so you could simply do:

require('raw-loader!../shaders/scales.glsl')

To get the shader string.

Jupyter lab uses raw-loader ~2.0.0, which uses ES module style, requiring you to do:

require('raw-loader!../shaders/scales.glsl').default

@astrofrog solved this by supporting both cases in #859. However, if we upgrade the devDependencies in bqplot to raw-loader 2, we can use the latter case for bundle building and jupyter lab building.

Replaces #859

…he shaders the same

This will allow bqplot to use WebGL within Jupyter lab

This replaces bqplot#859
@martinRenou
Copy link
Member

Is this ready to be merged?

@martinRenou
Copy link
Member

Doesn't this fix break compatibility with the classic Notebook? Shaders don't seem to compile anymore in the classic Notebook with this fix

@maartenbreddels
Copy link
Member Author

did you run npm install again to really install the new webpack?

@martinRenou
Copy link
Member

I guess, because I could get it to work with JupyterLab, but I will check again

@martinRenou
Copy link
Member

Works perfectly for me! I must have had a broken environment back then.

@SylvainCorlay would it be ok to merge this fix?

@SylvainCorlay SylvainCorlay merged commit aa4d248 into bqplot:master Sep 16, 2019
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

3 participants