When webpack packages the file, it adds the configured path prefix to the script path that introduces the absolute path external file, and reports an error in the packaging process. How to solve this problem?

the front-end public template adopts the ejs template
referencing external files directly within the template

<script async src="https://www.googletagmanager.com/gtag/js"</script>

content form of error report:

Warning: ENOENT: no such file or directory, stat "/data/deploy/www/***/app/release/***/www.googletagmanager.com/gtag/js" Use --force to continue.
Jul.22,2021

< script async src= " https://www.googletagmanager.;</script>
put this in index.html

Menu