如何删除任何文档中不存在或未被调用的依赖项?

时间:2015-12-29 23:46:43

标签: javascript jquery html css reactjs

我收到一个控制台日志404错误,指出缺少css资源,这些文件不需要或在任何地方使用。另一个奇怪的事情是错误引用来自我包含jQuery的地方。我知道jQuery不会调用那些CSS文件。任何人都可以帮我弄清楚如何摆脱错误,同时删除加载这些文件的企图?

Here是指向直播网站的链接!

以下是错误的图片。enter image description here

以下是HTML文档的代码,以便您可以看到这些文件未添加到文档中。

<html class="" lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <link rel="shortcut icon" href="assets/images/favicon.ico" type="image/png">
    <title>3D-SLIDES - Present your HTML and or Markup slides in a 3D Universe.</title>
    <link href="http://fonts.googleapis.com/css?family=Nothing+You+Could+Do" rel="stylesheet" type="text/css">
    <link href="assets/css/style.css" rel="stylesheet">
    <link href="assets/css/theme.css" rel="stylesheet">
    <link href="assets/css/ui.css" rel="stylesheet">
    <link rel="stylesheet" href="assets/plugins/uikit/css/uikit.css" />
    <link rel="stylesheet" href="assets/plugins/codemirror/lib/codemirror.css">
    <link rel="stylesheet" href="assets/plugins/uikit/css/components/htmleditor.css">
  </head>

    <!-- BEGIN BODY -->
    <body class="sidebar-collapsed color-default bg-lighter fixed-sidebar theme-sdtl ">
      <section style="opacity: 1;">


        <div id="appContainer"></div>


        </section>


        <!-- BEGIN PAGE SCRIPTS -->
    <script src="assets/plugins/jquery/jquery.js"></script>
    <script src="assets/plugins/uikit/js/uikit.min.js"></script>
    <script src="assets/plugins/codemirror/lib/codemirror.js"></script>
    <script src="assets/plugins/codemirror/mode/markdown/markdown.js"></script>
    <script src="assets/plugins/codemirror/addon/mode/overlay.js"></script>
    <script src="assets/plugins/codemirror/mode/xml/xml.js"></script>
    <script src="assets/plugins/codemirror/mode/gfm/gfm.js"></script>
    <script src="assets/plugins/marked/lib/marked.js"></script>
    <script src="assets/plugins/uikit/js/components/htmleditor.js"></script>
        <script src="assets/plugins/bootstrap/js/bootstrap.min.js"></script>
        <script src="assets/plugins/jquery-cookies/jquery.cookies.js"></script> <!-- Jquery Cookies, for theme -->
        <!-- END PAGE SCRIPTS -->

    <!-- REACT SCRIPTS -->
    <script type="text/javascript" src="./dest/bundle.js"></script>
        <script type="text/jsx">

        var slides = React.createElement(SlidesCreator);
        React.render(slides, document.body);

        </script>

        <script type="text/javascript">
        window.onload = function () {
            if(document.cookie) {
                document.cookie = '<div class' +'=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
            }
            // console.log(document.cookie);
        }
        </script>
  </body>

</html>

1 个答案:

答案 0 :(得分:1)

如果尚未完成,请确保您不使用@import包含来自其他人的css文件。