-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[v2] url-loader for miscAssets? (webpack-utils.js) #6963
Labels
type: question or discussion
Issue discussing or asking a question about Gatsby
Comments
piotrkwiecinski
added
the
type: question or discussion
Issue discussing or asking a question about Gatsby
label
Aug 2, 2018
Yeah — PDFs shouldn't ever be inlined. |
Anyone want to update the webpack config for this? |
Thanks for your feedback! I will try to make a pull request. |
zauni
pushed a commit
to zauni/gatsby
that referenced
this issue
Aug 6, 2018
KyleAMathews
pushed a commit
that referenced
this issue
Aug 7, 2018
* Assets use file-loader instead of url-loader Fixes #6963 * Just pdf files use file-loader
porfirioribeiro
pushed a commit
to porfirioribeiro/gatsby
that referenced
this issue
Aug 22, 2018
* Assets use file-loader instead of url-loader Fixes gatsbyjs#6963 * Just pdf files use file-loader
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
A small PDF file gets a base64 encoded URL, whereas in gatsby v1 it got a normal hashed URL.
Relevant information
In webpack-utils.js you define the url-loader for the loaders.file object and use it for audio, video and pdf files here
Is this wrong and it should be the normal file-loader (which is not producing base64 encoded urls) or is this the expected behavior and I should change my webpack config in the gatsby-node.js file to get the v1 behavior?
In my code is something like this:
In gatsby v1 the URL is like this:
/static/file.a01dde10.pdf
.In gatsby v2 the URL is like this:
data:application/pdf;base64,JVBERi0xLjYNJeLjz9...lRU9GDQo=
Thanks for any help or explanation!
The text was updated successfully, but these errors were encountered: