Giter VIP home page Giter VIP logo

Comments (6)

jlfwong avatar jlfwong commented on July 16, 2024

Hmm, I guess JSON.stringify isn't guaranteed to produce the same results on the server and client, so this might be a non-starter. We could code our own stable stringify function for our styles, perhaps?

from aphrodite.

sophiebits avatar sophiebits commented on July 16, 2024

It isn't?

from aphrodite.

jlfwong avatar jlfwong commented on July 16, 2024

@spicyj From (minimal) searching, I couldn't find anything providing a guarantee about character-for-character output matching for JSON.stringify between browsers, but maybe it does. If it does, great!

from aphrodite.

sophiebits avatar sophiebits commented on July 16, 2024

The ES6 spec (and I assume, ES5 too) specifies the exact behavior, like almost everything in JS.

from aphrodite.

xymostech avatar xymostech commented on July 16, 2024

This sounds excellent! This would also have the benefit of deduplicating styles that occur over different files but look the same (which I'm sure we're going to end up having all over the place).

It'd be nice to also think about how we want to do minification. It'd be nice if we could map from the really long concatenated names to something much shorter. That might require an extra step for rehydration (like passing a map of long name -> short name form the server to the client version of aphrodite).

from aphrodite.

xymostech avatar xymostech commented on July 16, 2024

Fixed by f45f87d

from aphrodite.

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.