Code Monkey home page Code Monkey logo

Comments (3)

brc-dd avatar brc-dd commented on July 17, 2024

Set metaChunk: true in your .vitepress config. It will extract that to separate file and won't exponentially increase your size.

from vitepress.

chenyaowen123 avatar chenyaowen123 commented on July 17, 2024

我也遇到了这个问题,页面较多时建议开启比较好,当我设置了 metaChunk: true,这让我的打包文件直接从500M降低至200M。这个配置比较有用,但是文档可能不够突出,我也是找了一段时间才找到。

from vitepress.

virskor avatar virskor commented on July 17, 2024

设置metaChunk: true只是把sidebar打包的文件单独抽离到一个JS中去,虽然很简单解决了这个问题但是只能称为优化,因为核心的解决因该是每个目录的sidebar仅影响该目录下生成的文件,而不打包到其他路径的文件中去。这样即便1000个目录100000个sidebar menu,打包后每个目录的文件也很小,实际请求只会涉及当前目录的。

from vitepress.

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.