Shook
V2EX  ›  问与答

TailwindCSS 如何跳过一些样式文件?

  •  
  •   Shook · Jan 29, 2021 · 969 views
    This topic created in 1956 days ago, the information mentioned may be changed or developed.

    在用 vue2 + tailwind + mand-mobile 。 mand-mobile 的按需加载+主题配置,是需要在 vue.config.js 全局引入 stylus 文件的。 这里是文档: https://didi.github.io/mand-mobile/#/zh-CN/docs/theme

    问题是,一旦引入全局文件,tailwind 就像疯了一样,启动项目要吃掉 3000MB 的内存。 在台式机还好,因为内存够大,所以只是启动和打包很慢,实际开发过程挺流畅的。 但是我开发完以后,提交以后在主管的 Macbook M1 上直接炸了。

    所以,tailwind 有办法排除一些文件吗,或者有没有其他办法解决?

    1 replies    2021-02-02 15:41:08 +08:00
    ShareManT
        1
    ShareManT  
       Feb 2, 2021
    看下官方文档奥。
    https://tailwindcss.com/docs/optimizing-for-production
    里面有讲树揺
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3274 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 11:57 · PVG 19:57 · LAX 04:57 · JFK 07:57
    ♥ Do have faith in what you're doing.