Babel 生成 public/index.html React 的 CSS 精确副本

问题描述

我正在尝试在我的 public/index.html 文件中使用 style.css 文件,但我在每个 CSS 文件中都获得了 index.html 的确切代码。我尝试安装 babel-plugin-Syntax-decoratorsbabel-plugin-transform-decorators。但没有运气。

我的 HTML 代码 -

<!DOCTYPE html>
<html lang="en">
  <head>
    <Meta charset="utf-8" />
    <title>Cronus File Manager</title>
    <Meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <!-- <link rel="icon" type="image/x-icon" href="img/logos/darkIcon.svg" /> -->
    <link
      rel="stylesheet"
      href="/path/to/font.css"
    />
    <link
      rel="stylesheet"
      href="/path/to/icon.css"
    />
    <link rel="stylesheet" id="layout-styles-anchor" href="/path/to/public.css" />

  </head>
  <body>
    <noscript>You need to enable JavaScript to run this app.</noscript>
    <div id="root"></div>
  </body>
</html>

生成的 CSS,(从 chrome 调试器中看到)-

<!DOCTYPE html>
<html lang="en">
  <head>
    <Meta charset="utf-8" />
    <title>Cronus File Manager</title>
    <Meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <!-- <link rel="icon" type="image/x-icon" href="img/logos/darkIcon.svg" /> -->
    <link
      rel="stylesheet"
      href="/path/to/font.css"
    />
    <link
      rel="stylesheet"
      href="/path/to/icon.css"
    />
    <link rel="stylesheet" id="layout-styles-anchor" href="/path/to/public.css" />

  </head>
  <body>
    <noscript>You need to enable JavaScript to run this app.</noscript>
    <div id="root"></div>
  </body>
</html>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...