Giter Site home page Giter Site logo

Comments (4)

EYHN avatar EYHN commented on August 28, 2024

使用 webpack 打包在 bundle.js 中,减少请求

from hexo-helper-live2d.

xiazeyu avatar xiazeyu commented on August 28, 2024

@EYHN 嗯,我想如果是device加在bundle.js里的话,移动设备就要下载一个巨型js,而事实上这个巨型js并不会被加载

from hexo-helper-live2d.

EYHN avatar EYHN commented on August 28, 2024

webpack 可以异步加载模块,但代码会被分成2个文件,没意义。

其实我们并不需要device.js这么多功能。是否可以使用浏览器api做简单判断。

from hexo-helper-live2d.

xiazeyu avatar xiazeyu commented on August 28, 2024

嗯,我不知道你所说的浏览器API是不是这个意思
https://www.zhihu.com/question/21357506
我个人认为用device.js bug什么的可能会比较少,UA判断也更加精确,方便以后可能的细分设备优化。

用Webpack异步= =我觉得现在逻辑还算清晰,用异步和手动引用没什么差别,要说差别也可能只是代码美观度上Orz

from hexo-helper-live2d.

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.