【问题标题】:npm run build in tailwind css with multiple html pagesnpm 在带有多个 html 页面的 tailwind css 中运行构建
【发布时间】:2022-10-08 13:45:31
【问题描述】:

我运行 npm run build 并创建了 dist 文件夹但是当我打开时我没有得到我的其他 html 文件并且在运行之后它只显示简单的 html 不包括 css 并且它没有我连接到的其他文件比如 about.html 联系人.html

【问题讨论】:

    标签: html css node.js npm tailwind-css


    【解决方案1】:

    <link rel="stylesheet" href="./dist/output.css"> 包含关于和联系 html 页面然后打开 tailwind.config.js 文件并使用

    module.exports = {
      content: ["./*.{html,js }" ],
      theme: {
        extend: {},
      },
      plugins: [],
    }
    

    或者

    module.exports = {
      content: ["./contact.html", "about.html"],
      theme: {
        extend: {},
      },
      plugins: [],
    

    }

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-08-05
      • 2013-04-13
      • 1970-01-01
      • 1970-01-01
      • 2020-10-14
      • 2021-11-18
      • 2020-02-22
      相关资源
      最近更新 更多