Giter Site home page Giter Site logo

关于css的同构 about react-ssr HOT 2 CLOSED

1111mp avatar 1111mp commented on July 26, 2024
关于css的同构

from react-ssr.

Comments (2)

dxx avatar dxx commented on July 26, 2024

isomorphic-style-loader 这个我没有用过。

关于第一次 css 没有同构的问题,这个在 master 分支和 webpack4.x 分支解决了。主要原因是原来的分支用了 loadable-components 2.2.3,不支持提取访问路由组件的 css。后面 @loadable/component 提供了获取组件的 css api。renderer.js 中有获取组件 css 并放入 html 头部的代码。

from react-ssr.

1111mp avatar 1111mp commented on July 26, 2024

使用@loadable/component其实是添加了link标签去preload对应的css文件 但是服务端dom string到web渲染的时候其实这部分资源是还没请求到的 所以还是会有css造成的闪烁的问题
我后来用isomorphic-style-loader解决了 谢谢啊 忘了关闭 不好意思
多谢 热更新那部分 真的强!谢谢谢谢~

from react-ssr.

Related Issues (6)

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.