【问题标题】:SCSS style got purged with @nuxtjs/tailwindcss使用@nuxtjs/tailwindcss 清除了 SCSS 样式
【发布时间】:2020-10-11 08:32:21
【问题描述】:

我有一个 nuxt 项目,我在其中使用 @nuxtjs/tailwindcssvue-formulate。我在 scss 文件中为 vue-formulate 声明了一些样式,当我执行 nuxt --spa 时效果很好,但是当我尝试使用 nuxt generate 生成项目并为其提供服务时,样式根本不适用。我做了一些测试,它似乎来自 @nuxtjs/tailwindcss。当我在我的 nuxt 配置中从 buildModules 中删除它时,它工作正常。如何在不删除 purgecss 步骤的情况下保持这种风格?

【问题讨论】:

    标签: javascript vue.js nuxt.js tailwind-css css-purge


    【解决方案1】:

    更新 nuxt 和 @nuxt/tailwindcss 解决了这个问题。

    【讨论】:

      【解决方案2】:

      查看将“vue-formulate”正在使用的类列入白名单。

      purge css whitelisting

      【讨论】:

      • 我尝试用/* purgecss start/end ignore */ 包装这些类,将它们列入白名单,但没有成功
      猜你喜欢
      • 2021-05-21
      • 2020-09-06
      • 2021-05-12
      • 2021-11-08
      • 1970-01-01
      • 2021-09-08
      • 2021-06-07
      • 2021-12-12
      • 2021-07-21
      相关资源
      最近更新 更多