vue 3 cloudflare pages build missing javascript tag

307 views Asked by At

I try to build my project locally and ran it using serve and succeeded, but when I deploy it to cloudflare pages the pages is blank, here the html source from cloudflare build

<!DOCTYPE html>
<html lang="en">
<head>
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxx"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
    </script>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <link rel="icon" href="favicon.ico">
  <title>xxxxx</title>
    <link id="theme-link" rel="stylesheet" href="themes/lara-light-indigo/theme.css">
</head>
    <body>
        <div id="app">
            <div class="preloader">
                <div class="preloader-content">
                </div>
            </div>
        </div>
    </body>
</html>

and here's the one from local build

<!DOCTYPE html>
<html lang="en">
<head>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-93461466-1"></script>
<script>window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());</script>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="icon" href="favicon.ico">
<title>xxx</title>
<link id="theme-link" rel="stylesheet" href="themes/lara-light-indigo/theme.css">
<link href="/css/chunk-079f4803.395e4d4d.css" rel="prefetch">
<link href="/css/app.4c84c43c.css" rel="preload" as="style">
<link href="/css/chunk-vendors.3827bea3.css" rel="preload" as="style"><link href="/js/app.4d1812d8.js" rel="preload" as="script">
<link href="/js/chunk-vendors.bc9985c6.js" rel="preload" as="script"><link href="/css/chunk-vendors.3827bea3.css" rel="stylesheet">
<link href="/css/app.4c84c43c.css" rel="stylesheet">
</head>
<body>
<div id="app">
<div class="preloader">
<div class="preloader-content">
</div>
</div>
</div>
<script src="/js/chunk-vendors.bc9985c6.js">
</script><script src="/js/app.4d1812d8.js"></script></body></html>

why there's no script tag there? the last one: <script src="/js/chunk-vendors.bc9985c6.js"> and <script src="/js/app.4d1812d8.js">

0

There are 0 answers