Giter Club home page Giter Club logo

Comments (8)

chrisdobler avatar chrisdobler commented on May 30, 2024

In a simple example I replaced the binary file client/js/components/Header/logo.png and suddenly I now get this error.

from spree_starter.

krzysiek1507 avatar krzysiek1507 commented on May 30, 2024

Hi @chrisdobler What is the size of the picture?

from spree_starter.

chrisdobler avatar chrisdobler commented on May 30, 2024

they range from 100kb and up. Whats the limit on the embedded images? I couldn't find that in the config.

from spree_starter.

chrisdobler avatar chrisdobler commented on May 30, 2024

I realized I could suppress the error message by turning off the prerender option in the rails view. I don't understand the implications of doing that though.

from spree_starter.

ridem avatar ridem commented on May 30, 2024

The "limit" is set in webpack.client.base.config.js
10000 = 10Kb. Under this limit, it loads as "a url", going your HTML payload. Above, it's using a regular file. You shouldn't raise this limit, at some point it becomes way less efficient to load as url.

It's not supposed to behave like this though. You probably don't want to remove server rendering either, because it's a key feature of this project.

I think I remember having a very similar issue when deploying such images, the image was passed into /assets/ but the routing in the build was wrong (served from the root, like in your issue). There's probably some tweaking to do in the webpack build files.
I'll feed this issue if I come across this issue again or if I can reproduce it

from spree_starter.

ridem avatar ridem commented on May 30, 2024

I can indeed reproduce the issue. If you try accessing /public/6b4fec0f21ce52aebc80204c2d5c4849.png instead of /6b4fec0f21ce52aebc80204c2d5c4849.png, you will see it's going through the asset pipeline.

I think it's a webpack config issue, but I don't have time to look at it right now.

from spree_starter.

chrisdobler avatar chrisdobler commented on May 30, 2024

thank you for the response as well as the explanations. I guess I'll remove server rendering temporarily until its patched.

from spree_starter.

chrisdobler avatar chrisdobler commented on May 30, 2024

I tried uploading to Heroku and am having the same issue in production.

from spree_starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.